-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
77 lines (70 loc) · 2.16 KB
/
.pre-commit-config.yaml
File metadata and controls
77 lines (70 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
76
77
repos:
# --- Core Pre-Commit Hooks ---
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: (^docs/|^tests/resources/|^notebooks/|^LICENSE$)
- id: end-of-file-fixer
exclude: (^docs/|^tests/resources/|^notebooks/|^LICENSE$)
- id: check-yaml
exclude: (^docs/|^notebooks/|^LICENSE$)
- id: check-added-large-files
args: ["--maxkb=500"]
exclude: (^docs/|^tests/resources/|^notebooks/|^LICENSE$)
- id: check-merge-conflict
- id: check-toml
# --- isort (sorting imports) ---
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
language_version: python3
exclude: (^docs/|^notebooks/|^LICENSE$)
# --- Ruff Lint & Format ---
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
hooks:
- id: ruff
args: ["--fix"]
exclude: (^docs/|^notebooks/|^LICENSE$)
# --- Black Code Formatter ---
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3
exclude: (^docs/|^notebooks/|^LICENSE$|build/)
# --- Mypy (type checking) ---
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
hooks:
- id: mypy
pass_filenames: false
args:
- "--config-file=pyproject.toml"
additional_dependencies:
- numpy
- types-setuptools
- typing-extensions
# --- Markdown Linting ---
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
args: ['--fix','--config','.markdownlint.yaml']
exclude: (^docs/|^notebooks/|^LICENSE$)
# --- Remove Notebook Metadata ---
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
files: '\.ipynb$'
# --- Codespell ---
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
types: [text]
exclude: (^docs/_build/|^tests/resources/|^build/|^dist/|^notebooks/|^LICENSE$)