-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
26 lines (23 loc) · 1021 Bytes
/
.pre-commit-config.yaml
File metadata and controls
26 lines (23 loc) · 1021 Bytes
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
repos:
# 1. General Sanity Checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace # Removes unnecessary spaces at ends of lines
- id: end-of-file-fixer # Ensures files end with a newline
- id: check-yaml # Validates your YAML files
exclude: ^mkdocs\.yml$ # Exclude mkdocs.yml (contains Python tags)
- id: check-added-large-files # Prevents accidentally committing giant files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.13
hooks:
- id: ruff
args: ["--fix"] # Automatically fix linting errors
files: ^src/.*\.py$ # Only process Python files in src/
- id: ruff-format # Formats the code like Black
files: ^src/.*\.py$ # Only process Python files in src/
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
files: ^src/.*\.py$ # Only process Python files in src/