-
Notifications
You must be signed in to change notification settings - Fork 13
/
.pre-commit-config.yaml
63 lines (63 loc) · 2.11 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
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.285
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
# Passing filenames to mypy can do odd things. See
# https://github.com/pre-commit/mirrors-mypy/issues/33.
# mypy.ini determines the set of files that will actually be checked.
pass_filenames: false
# The pre-commit hook passes some options, but we set options in mypy.ini.
args: []
# The pre-commit hook only has python, not pyi.
types: []
types_or: [python, pyi]
# TODO: unify the versions once Python 3.8 support is dropped
additional_dependencies: [
'numpy==1.24.4; python_version<"3.12.0rc1"',
'numpy==1.26.3; python_version>="3.12.0rc1"'
]
- repo: https://github.com/jazzband/pip-tools
rev: 7.1.0
hooks:
- name: pip-compile (py 3.8)
id: pip-compile
args: [requirements.in]
language_version: python3.8
files: '^requirements\.(?:in|txt)$'
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
hooks:
- name: pip-compile (py 3.12)
id: pip-compile
args: [requirements.in, -o, requirements-3.12.txt]
language_version: python3.12
files: '^(?:requirements\.in|requirements-3\.12\.txt)$'
- name: pip-compile (readthedocs)
id: pip-compile
args: [requirements-readthedocs.in, -o, requirements-readthedocs.txt]
language_version: python3.12
files: '^requirements(?:-readthedocs)?\.(?:in|txt)$'