Closed nkakouros closed 1 year ago
Isn't this duplicated by the (more detailed) #22?
Isn't this duplicated by the (more detailed) #22?
No, this is about the false positive. Issue #22 is about silencing NQA errors.
This is likely a duplicate of #2. This happens when the plugin itself respects # noqa
comments and stops sending the error to flake8. This is an anti-pattern and the proper behavior is for the plugin to just send it's errors regardless and trust flake8 to do the suppression.
If you're using vulture
stand-alone, then flake8 and by extension flake8-noqa will never see the error and so will always complain. The ideal fix here is to use vulture
as a flake8-plugin (which may require someone writing a plugin) and adding a switch to vulture
to ignore # noqa
comments when used as a plugin.
I see. I found this issue on vulture's issue tracker where they discussed making vulture a flake8 plugin, but this required support from upstream flake8 which was hostile to the idea. Does this mean that the only way forward for vulture users is #22?
Yes, if the errors aren't reported through flake8, there's no way for flake8-noqa to know if an error exists on a line or not.
I'm going to close this issue and give some thought to #22, at this point I'm thinking a config option to specify codes to ignore NQA102 errors on (I'd rather not add any additional info to the comments). It'll also help as a work around for plugins that do their own # noqa
processing.
I have a library file that I am checking with
vulture
. For a function that I define in there, I get the following error from vulture:I can silence this with
noqa VT103
. But then flake8-noqa will complain: