Closed ocaballeror closed 6 years ago
As explained here, flake8 does not, and probably will not ever support per-file ignores.
The suggested solutions are to either add # noqa
to every affected line (yikes!), or to install this flake8 extension, which doesn't seem like a very bad idea imo.
Yeah, sorry for that, I just created a pull request... :sweat:
I copied the syntax from when we used the old linting tools and, as it did not complain, I assumed it was working just fine.
PS: nice catch again! :blush:
I'm assuming the expected behavior from this:
Would be to ignore errors E402 and F401 only from
__init__.py
, but in fact, flake8 is ignoring those two errors globally.We may be missing a couple of useful warnings, so we should probably investigate how to properly ignore them from just that file.