Skip to content

Commit e768f93

Browse files
pre-commit
1 parent 4a9c387 commit e768f93

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Pre-commit hooks for fast linting checks
2+
# Type checking is intentionally excluded as it's slow
3+
# Install: pre-commit install
4+
# Run manually: pre-commit run --all-files
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v5.0.0
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-yaml
13+
- id: check-toml
14+
- id: check-json
15+
- id: check-added-large-files
16+
- id: check-merge-conflict
17+
18+
- repo: https://github.com/astral-sh/ruff-pre-commit
19+
rev: v0.9.2
20+
hooks:
21+
# Run the linter
22+
- id: ruff
23+
args: [--fix, --exit-non-zero-on-fix]
24+
# Run the formatter
25+
- id: ruff-format

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ dev-dependencies = [
9292
"nest_asyncio==1.6.0",
9393
"pytest-xdist>=3.6.1",
9494
"debugpy>=1.8.15",
95+
"pre-commit>=4.0.0",
9596
]
9697

9798
[tool.rye.scripts]

0 commit comments

Comments
 (0)