-
Notifications
You must be signed in to change notification settings - Fork 104
/
.pre-commit-config.yaml
55 lines (52 loc) · 1.61 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
# disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.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.8.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
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")