Derived from the flake8-pyi linter.
What it does#
Checks for the use of type comments (e.g.,
x = 1 # type: int) in stub
Why is this bad?#
.pyi) files should use type annotations directly, rather
than type comments, even if they're intended to support Python 2, since
stub files are not executed at runtime. The one exception is
# type: ignore.