Skip to content

Commit 48a79bc

Browse files
authored
Add FlakeHell to pre-commit hooks (#62)
- Add FlakeHell to pre-commit hooks - Remove Flake8 from pre-commit hooks - Add flake8-comprehensions to FlakeHell plugins
1 parent cd25491 commit 48a79bc

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ repos:
1616
- id: isort
1717
additional_dependencies: [toml]
1818

19-
- repo: https://github.com/PyCQA/flake8
20-
rev: 3.9.2
19+
- repo: https://github.com/flakehell/flakehell
20+
rev: v.0.8.0
2121
hooks:
22-
- id: flake8
23-
additional_dependencies: [flake8-bugbear]
22+
- id: flakehell
23+
additional_dependencies:
24+
- flake8-bugbear
25+
- flake8-comprehensions
2426

2527
- repo: https://github.com/pre-commit/pre-commit-hooks
2628
rev: v4.0.1

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,18 @@ line-length = 88
3636

3737
[tool.isort]
3838
profile = "black"
39+
40+
[tool.flakehell]
41+
exclude = ["*.ipynb"]
42+
extended_default_ignore = [] # hack from https://github.com/flakehell/flakehell/issues/10#issuecomment-822720074
43+
format = "grouped"
44+
max_complexity = 10
45+
max_line_length = 88
46+
show_source = true
47+
48+
[tool.flakehell.plugins]
49+
pycodestyle = ["+*", "-E203", "-E741"]
50+
pyflakes = ["+*"]
51+
mccabe = ["+*"]
52+
flake8-bugbear = ["+*"]
53+
flake8-comprehensions = ["+*"]

0 commit comments

Comments
 (0)