Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various docs improvements #16836

Merged
merged 2 commits into from
Jan 30, 2024
Merged

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".
docs/source/config_file.rst Outdated Show resolved Hide resolved
docs/source/existing_code.rst Outdated Show resolved Hide resolved
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

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@hauntsaninja hauntsaninja merged commit 1da0ebe into python:master Jan 30, 2024
2 checks passed
@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