-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
43 lines (39 loc) · 1.45 KB
/
.pre-commit-config.yaml
File metadata and controls
43 lines (39 loc) · 1.45 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
# Pre-commit configuration for SPINE
# Run: pip install pre-commit && pre-commit install
# Automatically runs code quality checks before each commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 # Updated to latest
hooks:
- id: trailing-whitespace
exclude: '\.md$' # Allow trailing spaces in Markdown
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe] # Allow project-specific YAML tags such as !download.
- id: check-toml # Added for pyproject.toml
- id: check-json
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 26.1.0 # Updated to latest
hooks:
- id: black
language_version: python3
args: [--line-length=88] # Explicit line length
- repo: https://github.com/pycqa/isort
rev: 7.0.0 # Updated to latest
hooks:
- id: isort
args: [--profile=black, --line-length=88] # Match Black config
- repo: https://github.com/pycqa/flake8
rev: 7.3.0 # Updated to latest
hooks:
- id: flake8
# Use same ignore list as CI for consistency
args: [
--max-line-length=88,
'--extend-ignore=E203,W503,F401,F403,F405,W605,E731,E741,F811,F821,F541,F841,E501,W391,W291,W293,E221,E265,E266,F822,F601,F823,E722,E711,E712,E713,E402,E721'
]