Virtually every medium to large library package I've encountered so far is structured as follows:
impl.py defines objects
__init__.py imports them, so that the library users don't need to know about impl.py.
At the moment, the __init__.py modules of packages that use flake8 are littered with either # noqa: F401 on every single line or # flake8: noqa at the top of the module which blanket disables everything.
This change request is to add a special case in pyflakes that disables F401 (only) when the file name is __init__.py.
An alternative approach would be to add to flake8 the ability to suppress specific errors at module level, e.g. # flake8: noqa: F401.
Virtually every medium to large library package I've encountered so far is structured as follows:
impl.pydefines objects__init__.pyimports them, so that the library users don't need to know aboutimpl.py.At the moment, the
__init__.pymodules of packages that use flake8 are littered with either# noqa: F401on every single line or# flake8: noqaat the top of the module which blanket disables everything.This change request is to add a special case in pyflakes that disables F401 (only) when the file name is
__init__.py.An alternative approach would be to add to flake8 the ability to suppress specific errors at module level, e.g.
# flake8: noqa: F401.