Skip to content

Commit 5760c49

Browse files
Revert the commit explaining ignoring unused-ignore more explicitly, which I have now spun out into an orthogonal PR
1 parent fb0203d commit 5760c49

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/source/error_code_list2.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,9 @@ Example:
481481
# Error: unused "type: ignore" comment
482482
return a + b # type: ignore
483483
484-
Mypy errors can typically be silenced by putting a ``# type: ignore`` comment after them,
485-
but because this is *already* a ``# type: ignore`` comment, the only way to selectively
486-
silence it is to include the error code explicitly, making the comment
487-
``# type: ignore[unused-ignore]``.
488-
489-
This error is not shown if the ``# type: ignore`` is not used due to code being statically
484+
Note that due to a specific nature of this comment, the only way to selectively
485+
silence it, is to include the error code explicitly. Also note that this error is
486+
not shown if the ``# type: ignore`` is not used due to code being statically
490487
unreachable (e.g. due to platform or version checks).
491488

492489
Example:

0 commit comments

Comments
 (0)