-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
67 lines (65 loc) · 2.07 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
default_language_version:
python: python3.10
minimum_pre_commit_version: '2.20.0'
ci:
skip: [mypy]
submodules: true
repos:
- repo: local
hooks:
- id: mypy
name: mypy (project + examples)
entry: tox run -q -e mypy -- src demo.py
language: system
files: ^(src/|demo\.py)
types_or: [python, pyi]
require_serial: true
pass_filenames: false
- id: mypy
name: mypy (tests)
files: ^((src|tests)/)
entry: tox run -q -e mypy -- tests
language: system
types_or: [python, pyi]
require_serial: true
pass_filenames: false
- repo: https://github.com/PyCQA/isort
rev: '5.13.2' # Keep in sync with requirements-dev.txt
hooks:
- id: isort
exclude: ^(devtools|demo_resources|\.github)/
args: ['--filter-files', '--settings-file', 'pyproject.toml']
- repo: https://github.com/psf/black
rev: '23.12.1' # Keep in sync with requirements-dev.txt
hooks:
- id: black
exclude: ^(devtools|demo_resources|\.github)/
args: ['--config', 'pyproject.toml']
- repo: https://github.com/PyCQA/flake8
rev: '7.0.0' # Keep in sync with requirements-dev.txt
hooks:
- id: flake8
exclude: ^(devtools|demo_resources|\.github)/
args: ['--config', '.flake8']
types: [] # Overwrite with empty in order to fallback to types_or
types_or: [python, pyi]
additional_dependencies: [ # keep in sync with requirements/requirement-dev.in
flake8-pyi>=22.11.0,
]
- repo: https://github.com/aio-libs/sort-all
rev: 'v1.2.0'
hooks:
- id: sort-all
exclude: ^(devtools|demo_resources|\.github)/
types: [] # Overwrite with empty in order to fallback to types_or
types_or: [python, pyi]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
hooks:
- id: mixed-line-ending
args: [--fix=lf]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-toml
- id: check-yaml