Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (65 loc) · 2.07 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
65 lines (65 loc) · 2.07 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
default_install_hook_types:
- pre-commit
- commit-msg
default_stages: [ pre-commit ]
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.27.0
hooks:
- id: commitlint
stages: [ commit-msg ]
additional_dependencies:
- '@commitlint/config-conventional'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.49.1
hooks:
- id: markdownlint
args:
- --config
- pyproject.toml
- --configPointer
- /tool/markdownlint
- repo: local
hooks:
# Run through uv so the lock file is the only place ruff's version is set.
- id: ruff-check
name: ruff check
entry: uv run ruff check --force-exclude --fix
language: unsupported
types_or: [ python, pyi, jupyter ]
- id: ruff-format
name: ruff format
entry: uv run ruff format --force-exclude
language: unsupported
types_or: [ python, pyi, jupyter, markdown ]
- id: uv-lock-check
name: check UV lock file
entry: uv lock --check
language: unsupported
pass_filenames: false
files: ^(pyproject\.toml|uv\.lock)$
- id: mypy
name: mypy
entry: uv run mypy .
language: unsupported
# A types/types_or filter cannot reach uv.lock, which identify tags as
# toml; mypy resolves against the locked packages, so bumps must retrigger.
files: ^(.*\.pyi?|pyproject\.toml|uv\.lock)$
pass_filenames: false