-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (63 loc) · 1.88 KB
/
.pre-commit-config.yaml
File metadata and controls
67 lines (63 loc) · 1.88 KB
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
# disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
ci:
autofix_prs: false
skip: [ty]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: |
(?x)^(
.*\.patch$
| ^conda_lock/_vendor/
)
- id: check-ast
exclude: ^conda_lock/_vendor/conda/_vendor/appdirs\.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- repo: local
hooks:
- id: ty
name: ty (type checker by Astral)
entry: python scripts/run_ty_via_micromamba.py
language: python
pass_filenames: false
additional_dependencies:
- ensureconda
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
stages: [manual]
additional_dependencies:
- gitpython
- jinja2
- pydantic
- pytest
- ruamel.yaml
- types-click
- types-click-default-group
- types-colorama
- types-filelock
- types-freezegun
- types-requests
- types-pygments
- types-pyyaml
- types-setuptools
- types-toml
# pre-commit provides all the files explicitly so setting exclude in mypy.ini doesn't work.
exclude: |
(?x)^(
^conda_lock/_vendor/.*\.pyi$
| ^tests/test-local-pip/setup\.py$
| ^tests/test-pip-repositories/fake-private-package.*-1\.0\.0/setup\.py$
)
# First exclude is due to:
# conda_lock/_vendor/conda/__init__.py: error: Duplicate module named "conda_lock._vendor.conda" (also at "conda_lock/_vendor/conda.pyi")
# Second two excludes are due to:
# tests/test-pip-repositories/fake-private-package-1.0.0/setup.py: error: Duplicate module named "setup" (also at "tests/test-local-pip/setup.py")