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

Add flake8 linter #1343

Merged
merged 21 commits into from May 15, 2020
Merged

Add flake8 linter #1343

merged 21 commits into from May 15, 2020

Conversation

@adisbladis
Copy link
Member

adisbladis commented May 13, 2020

This is mainly an addition to avoid import loops by detecting unused imports early and force them to be removed.

Flake8 also detects other things which may be of interest of us such as bad variable naming, cyclomatic complexity (this one is of great interest to me at least).

We opt out of a number of checks that conflict with black's auto formatting rules.

adisbladis added 2 commits May 13, 2020
@adisbladis adisbladis force-pushed the adisbladis:flake8 branch from 221b314 to 0f08322 May 13, 2020
adisbladis added 17 commits May 13, 2020
This is mainly an addition to avoid import loops by detecting unused
imports early and force them to be removed.

Flake8 also detects other things which may be of interest of us such
as bad variable naming, function complexity (this one is of great
interest).

We opt out of a number of checks that conflict with black's auto
formatting rules.
@adisbladis adisbladis force-pushed the adisbladis:flake8 branch from 0f08322 to 221c0e9 May 13, 2020
@grahamc
Copy link
Member

grahamc commented May 13, 2020

Ratchet is whatever, but the requirements.txt for the docs is out of date

adisbladis added 2 commits May 14, 2020
Copy link
Member

grahamc left a comment

Easiest yes all day

@grahamc
Copy link
Member

grahamc commented May 15, 2020

Ignoring the ratchet since this is strictly an improvement, and a few deleted imports shouldn't be penalized.

@grahamc grahamc merged commit 9807e68 into NixOS:master May 15, 2020
9 of 10 checks passed
9 of 10 checks passed
parsing
Details
build
Details
black
Details
mypy
Details
flake8
Details
mypy-ratchet mypy-ratchet
Details
coverage
Details
docs
Details
poetry-up-to-date
Details
docs/readthedocs.org:nixops Read the Docs build succeeded!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.