Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

Recommend --disable-error-code=import-untyped. It's probably strictly better than --ignore-missing-imports for most users.

Remove the displaying error codes section, since it's on by default.

Some more advice and discoverability for "using mypy with an existing codebase".

Recommend `--disable-error-code=import-untyped`. It's probably strictly
better than `--ignore-missing-imports` for most users.

Remove the displaying error codes section, since it's on by default.

Some more advice and discoverability for "using mypy with an existing
codebase".
You can also set the :option:`--ignore-missing-imports <mypy --ignore-missing-imports>`
command line flag or set the :confval:`ignore_missing_imports` config file
option to True in the *global* section of your mypy config file. We
recommend avoiding ``--ignore-missing-imports`` if possible: it's equivalent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that also what disable_error_code = import-untyped does? Might need a clearer explanation of the difference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if you have a typo, your error code will be import-not-found instead of import-untyped. I link to the import-untyped docs that explain this

@hauntsaninja hauntsaninja merged commit 1da0ebe into python:master Jan 30, 2024
@hauntsaninja hauntsaninja deleted the existing-docs branch January 30, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants