-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
88 lines (79 loc) · 2.1 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
repos:
- repo: https://github.com/psf/black
rev: 24.4.2 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.3.0]
exclude: "^tests/"
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: ["tomli"]
exclude: "^(tests/|examples/)"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: ['tomli'] # needed to parse pyproject.toml
exclude: '^poetry\.lock$'
- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.3.1
hooks:
- id: add-license-headers
args: ["--start_year", "2023"]
- repo: local
hooks:
- id: poetry-pyproject-consistency
name: "poetry: check pyproject.toml consistency"
entry: poetry
language: system
args: ["check"]
files: '^pyproject\.toml$'
pass_filenames: false
- id: poetry-lockfile-consistency
name: "poetry: check lockfile consistency"
entry: poetry
language: system
args: ["lock", "--check"]
files: '^(pyproject\.toml|poetry\.lock)$'
pass_filenames: false
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: "^(doc/)|(tests/)|(examples/)"
- id: mypy-code
name: "mypy: strict checks on code"
entry: mypy
language: python
types: [python]
require_serial: true
exclude: "^(doc/)|(tests/)|(examples/)"
args: ["--strict", "--namespace-packages", "--explicit-package-bases"]
- id: mypy-tests
name: "mypy: lenient checks on tests"
entry: mypy
language: python
types: [python]
require_serial: true
files: "^(tests/)"
args: ["--namespace-packages", "--explicit-package-bases"]