Flake8 v6.0.0 throws "imported but unused" for type annotations in comments
how did you install flake8?
pip install flake8
unmodified output of flake8 --bug-report
{
"platform": {
"python_implementation": "CPython",
"python_version": "3.8.10",
"system": "Linux"
},
"plugins": [
{
"plugin": "mccabe",
"version": "0.7.0"
},
{
"plugin": "pycodestyle",
"version": "2.10.0"
},
{
"plugin": "pyflakes",
"version": "3.0.0"
}
],
"version": "6.0.0"
}
describe the problem
what I expected to happen
This looks like a regression in version 6.0.0, in previous versions type annotations in comments are passed.
Given code somewhat like the following
sample code
from mptt.models import MPTTModel
def some_func(thing):
parent = thing.model # type: MPTTModel
version 5: passes
version 6: fails with
./audit_log/models.py:17:1: F401 'mptt.models.MPTTModel' imported but unused
commands ran
$ flake8 .
...
flake8 does not implement any checks
This seems to be caused by "pyflakes" version bump
@joshbrooks I don't understand your thumbs down -- you skipped the issue prompt where it tells you where to report issues with F__ codes, then you ignored the prompt in the issue form itself which says NOTE: flake8 is a linting framework and does not implement any checks
Thanks for the explanation, I should have read more carefully before opening the issue. My sincere apologies.
The thumbs down has been removed, it was intended to indicate that the comment closing the issue didn't provide sufficient detail