-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (47 loc) · 1.49 KB
/
.pre-commit-config.yaml
File metadata and controls
53 lines (47 loc) · 1.49 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
default_install_hook_types: [pre-commit, pre-push, commit-msg]
repos:
# Ruff: lint + autofix
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
stages: [pre-commit, pre-push]
args: ["--fix"]
- id: ruff-format
stages: [pre-commit, pre-push]
# Pydoclint: docstring linting (configured in pyproject.toml)
- repo: local
hooks:
- id: pydoclint
name: pydoclint
entry: uv run pydoclint
language: system
types: [python]
stages: [pre-commit, pre-push]
# Type checking (BasedPyright)
- repo: local
hooks:
- id: basedpyright
name: basedpyright
# `--level error` treats warnings (mostly JAX untyped members and Any leaks)
# as non-blocking; only hard type errors fail the gate.
entry: uv run basedpyright --level error
language: system
types: [python]
# Run once on the project rather than per-file so basedpyright sees the
# full type graph and the pyproject include/exclude rules.
pass_filenames: false
stages: [pre-commit, pre-push]
# Commit message linting (Conventional Commits)
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
stages: [commit-msg]
# Generic hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace