Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally don't enforce checker on __init__.py #10

Open
henrywallace opened this issue Feb 7, 2017 · 3 comments
Open

Optionally don't enforce checker on __init__.py #10

henrywallace opened this issue Feb 7, 2017 · 3 comments

Comments

@henrywallace
Copy link

henrywallace commented Feb 7, 2017

__init__.py shouldn't be considered code, or at least it should be considered differently.

It doesn't make sense to enforce print_function, division on a file that only contains imports, a docstring, and perhaps __all__.

Perhaps a better option would be, don't enforce for an __init__.py file only having some subset of {imports, docstrings, comments, all = ...}?

Another option would be to have a separate --select or --ignore for __init__.py files.

@cleder
Copy link

cleder commented Sep 28, 2018

require-code=True solves this for empty __init__ files

@labrys
Copy link

labrys commented Apr 7, 2019

If you don't want a specific error on non-empty __init__.py just add it to your per-file-ignores.

@DylanYoung
Copy link

Should the require-code option also ignore imports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants