Skip to content

STYLE: Add additional flake8 plugins #20588

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

Closed
jschendel opened this issue Apr 2, 2018 · 5 comments
Closed

STYLE: Add additional flake8 plugins #20588

jschendel opened this issue Apr 2, 2018 · 5 comments
Labels
CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Code Style Code style, linting, code_checks

Comments

@jschendel
Copy link
Member

xref #20563 (comment)

Might be nice to add some additional flake8 plugins to check various things:

Any other ideas are welcome.

@TomAugspurger
Copy link
Contributor

Import order :)

Linters for the docstrings and code sections of the prose docs (flake8 or otherwise) would be great.

@TomAugspurger TomAugspurger added CI Continuous Integration Code Style Code style, linting, code_checks labels Apr 3, 2018
@jbrockmendel
Copy link
Member

jbrockmendel commented Jul 14, 2018

Couple of options for import order.
https://pypi.org/project/flake8-imports/
https://pypi.org/project/flake8-isort/
https://github.com/PyCQA/flake8-import-order <-- tentatively looks like the best bet, need to figure out the config options

update After poking at these, I don't think any of them do what we want.

Docstrings (@datapythonista I'm going to back you up whatever your opinion is on this one)
https://pypi.org/project/flake8-docstrings/ <-- wraps pydocstyle
https://pypi.org/project/flake8-rst-docstrings/ <-- wraps docutils

Misc
https://pypi.org/project/flake8-self/ <-- check for private variable access
https://pypi.org/project/flake8-pep3101/ <-- old-style string formatting (514 hits ATM)
https://pypi.org/project/flake8-builtins/ <-- check for overriding built-in names
https://pypi.org/project/flake8-comprehensions/ <-- list/set/dict comprehensions (or do we already lint for that well enough?)

@mroeschke
Copy link
Member

+1 for flake8-comprehensions. Would close #18464 and replace some ad hoc regexes to check for unnecessary comprehensions.

@jbrockmendel
Copy link
Member

We've pushed pretty far down this road, and have been implementing custom linting for a while. Is there anything else to do here, or closeable?

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Sep 22, 2020
@MarcoGorelli
Copy link
Member

IMO this can be closed, any extra plugins can be discussed individually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Code Style Code style, linting, code_checks
Projects
None yet
Development

No branches or pull requests

5 participants