File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1111y : int = "" # type: ignore - additional stuff
1212
1313# The following type violation should be suppressed.
14- z : int = "" # type: ignore[additional_stuff ]
14+ z : int = "" # type: ignore[assignment ]
1515
1616# > In some cases, linting tools or other comments may be needed on the same
1717# > line as a type comment. In these cases, the type comment should be before
Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ other comments and linting markers:
7373
7474 # type: ignore # <comment or other marker>
7575
76+ Any text following ``# type: ignore `` is ignored, provided there is at least one
77+ whitespace character after ``# type: ignore ``. The form of
78+ ``# type: ignore[error_code1, error_code2] `` can be used to filter error codes
79+ that may vary across type checkers. Type checkers may ignore the bracketed
80+ codes and treat this form as equivalent to ``# type: ignore ``.
81+
82+
7683.. _`cast` :
7784
7885``cast() ``
You can’t perform that action at this time.
0 commit comments