Skip to content

Commit 0409f87

Browse files
add pre-commit hooks and update dev dependencies
1 parent 2cb6dfd commit 0409f87

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-added-large-files
8+
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
rev: v0.12.1
11+
hooks:
12+
- id: ruff
13+
args: ["check", "crudadmin", "--fix"]
14+
- id: ruff-format
15+
args: ["crudadmin"]
16+
17+
- repo: https://github.com/pre-commit/mirrors-mypy
18+
rev: v1.16.1
19+
hooks:
20+
- id: mypy
21+
args: ["crudadmin", "--strict"]

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ dev = [
8989
"httptools>=0.6.4",
9090
"httpx>=0.28.1",
9191
"sqlalchemy[mypy]>=2.0.36",
92-
"sqlalchemy-utils>=0.41.2"
92+
"sqlalchemy-utils>=0.41.2",
93+
"pre-commit>=3.5.0"
9394
]
9495

9596
docs = [

0 commit comments

Comments
 (0)