You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Whole file # type: ignore does not silence import errors #6852
I just discovered PR #6830 and tried it out in master. It seems to work for the most part, but Mypy still complains about missing stub files. For example:
# type: ignore
import boto3 # This does not get ignored.
n:List[int] = 'a' # This gets ignored.
x.py:2: error: No library stub file for module 'boto3'
x.py:2: note: (Stub files are from https://github.com/python/typeshed)
It seems missing a critical stub file is a good use case for ignoring an entire file, but perhaps I'm missing something. Hope this helps!
Activity
brandtbucher commentedon May 16, 2019
I can reproduce this. It looks like the
MypyFile.importsaren't being marked as unreachable.I'll take a peek at this when I have the time. Thanks for the heads-up!
Fix whole-file ignoring. (#6853)
Fix whole-file ignoring. (python#6853)