Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
75 lines (67 loc) · 2.16 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
75 lines (67 loc) · 2.16 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
68
69
70
71
72
73
74
75
default_language_version:
python: python3
repos:
- repo: local
hooks:
- id: export-requirements
name: Export pip compatibility requirements
entry: tools/export_requirements.sh
language: system
pass_filenames: false
# The outputs are listed too, so a hand edit gets reverted.
# requirements-eval.txt and requirements-typecheck.txt stay
# hand-written: both install with `--no-deps` and hold pins no
# resolver accepts.
files: ^(pyproject\.toml|uv\.lock|modelconverter/__init__\.py|tools/export_requirements\.sh|requirements(-dev)?\.txt)$
- repo: https://github.com/crate-ci/typos
rev: v1.51.1
hooks:
- id: typos
# Fails a function above cognitive complexity 15 and prints ranked
# refactor plans for it. Check by hand with
# `uv run complexipy modelconverter tests`.
- repo: https://github.com/rohaquinlop/complexipy-pre-commit
rev: v8.1.0
hooks:
- id: complexipy
args: [--suggest-refactors]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.1
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
args: [--number]
additional_dependencies:
- mdformat-gfm
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/JoC0de/pre-commit-prettier
rev: v3.9.10
hooks:
- id: prettier
types_or: [yaml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-shebang-scripts-are-executable
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-yaml
- id: check-json
- id: detect-private-key
- id: check-toml
- id: no-commit-to-branch
args: [--branch, main]