Yes! Upgrading to latest flake8 (implying latest pyflakes) and removing a bunch of
# noqa from our codebase.
Fix false positive with partially quoted annotations
What would happen was that we would have code like:
from app.resources.blah import Blah
And flake8/pyflakes would complain F401 for unused import, as it didn't realize that Blah was used in the type declaration. With
"Blah" it would work, in the cases where you don't use e.g.
Union, and with
"Optional[Blah]" it would work too, but I only knew the quote-all-the-things workaround today, on the same day I found the real fix.
Fewer noqa good.
#python #pyflakes #flake8