-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (55 loc) · 2.5 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
62 lines (55 loc) · 2.5 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-ast # Simply check whether the files parse as valid python
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-toml # Attempts to load all TOML files to verify syntax
- id: check-yaml # Attempts to load all YAML files to verify syntax
- id: check-vcs-permalinks # Ensures that links to VCS websites are permalinks
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source
- id: detect-private-key # Detects the presence of private keys
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: mixed-line-ending # Replaces or checks mixed line ending
- id: trailing-whitespace # Trims trailing whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa # enforce that noqa annotations always occur with specific codes
- id: python-check-blanket-type-ignore # enforce that # type: ignore annotations always occur with specific codes
- id: python-no-log-warn # check for the deprecated .warn() method of python loggers
- id: python-use-type-annotations # enforce that type annotations are used instead of type comments
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: ['--py310-plus']
- repo: local
hooks:
- id: ty-check
name: ty check
entry: uv run --group types ty check --output-format concise src
language: system
always_run: true
pass_filenames: false
require_serial: true
types_or: [python, pyi]
- repo: https://github.com/yunojuno/pre-commit-xenon
rev: v0.1
hooks:
- id: xenon
args: ["--max-average=B", "--max-modules=B", "--max-absolute=B"]
# - repo: https://github.com/regebro/pyroma
# rev: "5.0.1"
# hooks:
# - id: pyroma
ci:
autoupdate_commit_msg: Autoupdate pre-commit hooks
autoupdate_schedule: quarterly
skip: [ty-check]