If your code uses any of the above unsupported features and is causing errors when mypy checks your code, you can bypass it by adding # type: ignore to the line that causes the error.
This however is not an option if other type checkers, such as pyright do not report an error.
For example if pyright correctly accepts a line, it will correctly report an error Unnecessary "# type: ignore" comment
Feature
Allow to ignore type errors specifically for mypy, in a way that will not interfere with other type checkers.
Suggestion:
Note that the example above would correctly report an error. It should just show the proposed syntax. See #18133 for a real-word example.
Pitch
mypy, like any other library, may have bugs, or report warnings that we deliberately want to ignore.
This page suggests
This however is not an option if other type checkers, such as pyright do not report an error. For example if pyright correctly accepts a line, it will correctly report an error
Unnecessary "# type: ignore" comment