Uh oh!
There was an error while loading. Please reload this page.
Don't ignore imports with a '# type: ignore' comment - #1737
Conversation
Instead just try to process them--if that fails, the resulting error will be ignored anyways. As far as I can tell, this doesn't actually change any behavior; it's just a code simplification. It also matches the non-existence of similar logic in the new fast parser.
rwbarton
commented
Jun 22, 2016
This is needed for #1695 to not give extraneous warnings about unused |
gvanrossum
commented
Jun 22, 2016
I don't think I like this (based on just the description). There could be something in the offending module that causes a mypy crash, or it could have errors that we don't want to deal with right now (esp. in a context where we insist on all mypy runs to be error-free). |
rwbarton
commented
Jun 22, 2016
Ah, good point. Indeed a In that case, the fast parser should do the same thing; I'll file a ticket for that. As for #1695, I'll just make it never warn about |
These should cause mypy to skip processing the imported module entirely, which I tried to break in python#1737.
Instead just try to process them--if that fails, the resulting error
will be ignored anyways.
As far as I can tell, this doesn't actually change any behavior; it's
just a code simplification. It also matches the non-existence of
similar logic in the new fast parser.