-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
60 lines (53 loc) · 1.56 KB
/
.pre-commit-config.yaml
File metadata and controls
60 lines (53 loc) · 1.56 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- id: check-case-conflict
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
exclude: ^tests/
- repo: https://github.com/python-poetry/poetry
rev: 1.7.0
hooks:
- id: poetry-check
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/dosisod/refurb
rev: v1.24.0
hooks:
- id: refurb
language_version: python3
# use pip-audit instead of safety for now (it only handles pyproject.toml with Poetry)
# - repo: https://github.com/Lucas-C/pre-commit-hooks-safety
# rev: v1.3.2
# hooks:
# - id: python-safety-dependencies-check
# name: safety (root pyproject)
# pass_filenames: false
# files: ^pyproject\.toml$
# args: ["pyproject.toml"]
- repo: https://github.com/pypa/pip-audit
rev: v2.9.0
hooks:
- id: pip-audit
name: pip-audit (pyproject)
pass_filenames: false # we audit the project, not specific files
args: ["."]
language_version: python3.12 # macOS, the Python 3.13 breaks pip-audit