-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
48 lines (44 loc) · 1.57 KB
/
.pre-commit-config.yaml
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
# Pre-commit configuration
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks and configuration.
repos:
# Official pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
# Removes trailing whitespace in all text files
- id: end-of-file-fixer
# Ensures files end with a newline
- id: check-yaml
# Validates YAML files
- id: check-added-large-files
# Prevents adding large files to the repository
- id: check-merge-conflict
# Checks that files do not contain merge conflict strings
- id: debug-statements
# Ensures no print or pdb statements remain in production code
# Black for code formatting
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3.11
additional_dependencies: []
# Auto-formats Python code using Black
# isort for import sorting
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
language_version: python3.11
# Sorts imports based on PEP8 standards
# Ruff for linting and code quality checks
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
language_version: python3.11
additional_dependencies: []
# Ruff is a fast Python linter, also can replace flake8 + isort checks if configured
# Adjust pyproject.toml or ruff.toml for configuration if needed