opensistemas-hub / osbrain

osBrain - A general-purpose multi-agent system module written in Python
https://osbrain.readthedocs.io/en/stable/
Apache License 2.0
175 stars 43 forks source link

Flake8 ignores too many errors #283

Closed ocaballeror closed 6 years ago

ocaballeror commented 6 years ago

I'm assuming the expected behavior from this:

[flake8]
ignore =
    __init__.py E402 F401

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.

ocaballeror commented 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.

Peque commented 6 years ago

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: