Skip to content

Commit 24ce552

Browse files
Add autoflake to pre-commit and reorder the check
Co-Authored-By: Pierre Sassoulas <[email protected]>
1 parent 339f16f commit 24ce552

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: 20.8b1
2+
- repo: https://github.com/myint/autoflake
3+
rev: v1.4
44
hooks:
5-
- id: black
6-
args: [--safe, --quiet]
7-
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
5+
- id: autoflake
6+
exclude: &fixtures tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
7+
args:
8+
- --in-place
9+
- --remove-all-unused-imports
10+
- --expand-star-imports
11+
- --remove-duplicate-keys
12+
- --remove-unused-variables
813
- repo: https://github.com/pre-commit/pre-commit-hooks
914
rev: v2.1.0
1015
hooks:
@@ -14,3 +19,9 @@ repos:
1419
rev: 5.5.2
1520
hooks:
1621
- id: isort
22+
- repo: https://github.com/ambv/black
23+
rev: 20.8b1
24+
hooks:
25+
- id: black
26+
args: [--safe, --quiet]
27+
exclude: *fixtures

0 commit comments

Comments
 (0)