-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
53 lines (53 loc) · 1.75 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
repos:
- repo: https://github.com/psf/black
rev: "22.10.0"
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: "7.0.0"
hooks:
- id: flake8
# mypy is configured as a "local" repo so that it has access to the installed
# virtualenv. The alternative is to list all the necessary packages for
# type-checking as additional_dependencies, and without something like
# https://github.com/pre-commit/pre-commit/issues/730 this will lead to
# unwanted duplication.
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
files: '\.pyi?$'
# 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
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks:
- id: pip-compile
name: pip-compile setup.cfg
args:
- --output-file=requirements.txt
# --strip-extras makes the output usable as a constraint file
- --strip-extras
- setup.cfg
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
language_version: python3.8
files: '^(requirements\.txt|setup\.cfg)$'
- id: pip-compile
name: pip-compile test-requirements.in
args:
- --output-file=test-requirements.txt
- --strip-extras
- test-requirements.in
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
language_version: python3.8
files: '^((test-)?requirements\.(in|txt)|setup\.cfg)$'