-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (52 loc) · 1.34 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (52 loc) · 1.34 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
# Pre-commit hooks configuration
# Install with: pip install pre-commit && pre-commit install
repos:
# Trailing whitespace and file fixes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
# Type checking with mypy (optional, comment out if not needed)
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.13.0
# hooks:
# - id: mypy
# additional_dependencies: [types-all]
# args: [--ignore-missing-imports]
# Custom hook for formatting and generating API documentation
- repo: local
hooks:
- id: format-and-generate-docs
name: Format Code and Generate API Documentation
entry: python scripts/format_and_generate_docs.py
language: system
pass_filenames: false
always_run: true
stages: [pre-commit]
# Global excludes
exclude: |
(?x)^(
.*\.(pyc|pyo|egg-info|egg|whl|tar\.gz|zip)|
\.git/|
\.tox/|
\.venv/|
env/|
venv/|
\.env|
build/|
dist/|
__pycache__/|
\.pytest_cache/|
\.mypy_cache/|
\.ruff_cache/|
docs/_build/|
tmp-files/|
uv\.lock
)$