Skip to content

Commit 38165f1

Browse files
committed
get pre-commit hooks to be somewhat useful
- match .pyi files - flake8 seems to have too many problems - do the imports before black since zimports isn't doing long lines correctly
1 parent b35e2bd commit 38165f1

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: https://github.com/python/black
5-
rev: 20.8b1
6-
hooks:
7-
- id: black
8-
94
- repo: https://github.com/sqlalchemyorg/zimports
105
rev: 0.2.2
116
hooks:
127
- id: zimports
8+
types: [file]
9+
files: \.(py|pyi)$
1310

14-
- repo: https://github.com/pycqa/flake8
15-
rev: 3.8.4
11+
- repo: https://github.com/python/black
12+
rev: 20.8b1
1613
hooks:
17-
- id: flake8
18-
additional_dependencies:
19-
- flake8-import-order
20-
- flake8-builtins
21-
- flake8-docstrings
22-
- flake8-rst-docstrings
23-
- pydocstyle<4.0.0
24-
- pygments
25-
26-
14+
- id: black
15+
types: [file]
16+
files: \.(py|pyi)$
2717

2818

0 commit comments

Comments
 (0)