-
Notifications
You must be signed in to change notification settings - Fork 10
/
.pre-commit-config.yaml
47 lines (43 loc) · 1.36 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
ci:
autoupdate_schedule: quarterly
skip: [pip-compile]
repos:
# Syntax validation and some basic sanity checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-ast
fail_fast: True
- id: check-json
- id: check-added-large-files
args: ['--maxkb=200']
- id: check-yaml
# Linting, sorting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# Type checking
# Remember to change versions in .azure-pipelines/azure-pipelines.yml to match
# the versions here.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
files: 'dials_data/.*\.py$'
additional_dependencies: ['types-PyYAML==6.0.12', 'types-requests==2.31.0']
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.30
hooks:
- id: pip-compile
args: [pyproject.toml, -q, -o, requirements.txt]
files: ^(pyproject.toml|requirements(_dev|_doc)?.txt)$
- id: pip-compile
args: [pyproject.toml, -q, --extra, test, -o, requirements_dev.txt]
files: ^(pyproject.toml|requirements(_dev|_doc)?.txt)$
- id: pip-compile
args: [pyproject.toml, -q, --extra, doc, -o, requirements_doc.txt]
files: ^(pyproject.toml|requirements(_dev|_doc)?.txt)$