-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.pre-commit-config.yaml
72 lines (65 loc) · 2 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast # Is it valid Python?
- id: debug-statements # no debbuging statements used
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
# - id: check-executables-have-shebangs
- id: check-json
- id: pretty-format-json
args: [ "--autofix" ]
- id: check-merge-conflict
- id: check-docstring-first
- id: requirements-txt-fixer
# - id: detect-aws-credentials
- id: detect-private-key
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3
args:
- --line-length=120
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [ black ]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
exclude: ^(docs|scripts|tests)/
# E203 whitespace before ':'
args:
- --max-line-length=120
- --ignore=E203
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
args: [ "--no-build-isolation", "--ignore", "*.png,docs/*,publish.py,readthedocs.yml,poetry.lock,setup.py,scripts/*" ]
additional_dependencies: [ numpy, poetry>=1.4 ]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
hooks:
- id: pyupgrade
# TODO enable for very detailed linting:
# - repo: https://github.com/pycqa/pylint
# rev: pylint-2.6.0
# hooks:
# - id: pylint