Skip to content

Commit 890b09e

Browse files
committed
add codespell and mypy commit hook
also pre-commit autoupdate add flags --remove-unused-variables --expand-star-imports to autoflake hook
1 parent c00e303 commit 890b09e

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
skip: [mypy]
4+
5+
default_stages: [commit]
6+
7+
default_install_hook_types: [pre-commit, commit-msg]
8+
19
exclude: ^(docs/|.*test_files/|.*tests/)
210

311
repos:
@@ -7,25 +15,36 @@ repos:
715
- id: autoflake
816
args:
917
- --in-place
18+
- --remove-unused-variables
1019
- --remove-all-unused-imports
11-
- --remove-unused-variable
20+
- --expand-star-imports
1221
- --ignore-init-module-imports
1322

1423
- repo: https://github.com/psf/black
1524
rev: 22.6.0
1625
hooks:
1726
- id: black
1827

19-
- repo: https://github.com/pycqa/flake8
20-
rev: 4.0.1
28+
- repo: https://github.com/PyCQA/flake8
29+
rev: 5.0.4
2130
hooks:
2231
- id: flake8
2332

33+
- repo: https://github.com/pre-commit/mirrors-mypy
34+
rev: v0.971
35+
hooks:
36+
- id: mypy
37+
additional_dependencies: [types-requests]
38+
2439
- repo: https://github.com/pre-commit/pre-commit-hooks
2540
rev: v4.3.0
2641
hooks:
42+
- id: check-case-conflict
43+
- id: check-symlinks
2744
- id: check-yaml
45+
- id: destroyed-symlinks
2846
- id: end-of-file-fixer
47+
- id: mixed-line-ending
2948
- id: trailing-whitespace
3049

3150
- repo: https://github.com/asottile/pyupgrade
@@ -34,6 +53,12 @@ repos:
3453
- id: pyupgrade
3554
args: [--py38-plus]
3655

56+
- repo: https://github.com/codespell-project/codespell
57+
rev: v2.2.1
58+
hooks:
59+
- id: codespell
60+
stages: [commit, commit-msg]
61+
3762
- repo: https://github.com/PyCQA/isort
3863
rev: 5.10.1
3964
hooks:

0 commit comments

Comments
 (0)