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
fast parser: # type: ignore should ignore non-* imports entirely #1739
The parse_file function from the old parser does this:
# Skip imports that have been ignored (so that we can ignore a C extension module without# stub, for example), except for 'from x import *', because we wouldn't be able to# determine which names should be defined unless we process the module. We can still# ignore errors such as redefinitions when using the latter form.imports= [nodefornodeinself.importsifnode.linenotinself.ignored_linesorisinstance(node, ImportAll)]
node=MypyFile(defs, imports, is_bom, self.ignored_lines,
weak_opts=weak_opts)
The effect is that a # type: ignore comment on an import statement doesn't just silence errors on that line, but also prevents mypy from trying to process the imported module at all.
Activity
rwbarton commentedon Jun 22, 2016
Actually I may just fix this as a side effect of #1695.
Warn about unused '# type: ignore' comments
Warn about unused '# type: ignore' comments (#1695)
rwbarton commentedon Jun 23, 2016
Fixed by #1695.