8000 Do not show unused-ignore errors in unreachable code, and make it a real error code by ilevkivskyi · Pull Request #15164 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Do not show unused-ignore errors in unreachable code, and make it a real error code #15164

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

Merged
merged 7 commits into from
May 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
JukkaL authored May 2, 2023
commit 47cb72eea836cd03a3d4549f57cb3f5ab5c5e76c
6 changes: 3 additions & 3 deletions docs/source/error_code_list2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ Example:

Note that due to a specific nature of this comment, the only way to selectively
silence it, is to include the error code explicitly. Also note that this error is
not shown if the the ``# type: ignore`` is not used due to code being statically
unreachable (e.g. due to platform or version check).
not shown if the ``# type: ignore`` is not used due to code being statically
unreachable (e.g. due to platform or version checks).

Example:

Expand All @@ -381,7 +381,7 @@ Example:
import sys

try:
# The "[unused-ignore]" is needed to get clean mypy run
# The "[unused-ignore]" is needed to get a clean mypy run
# on both Python 3.8, and 3.9 where this module was added
import graphlib # type: ignore[import,unused-ignore]
except ImportError:
Expand Down
0