Skip to content

Commit df7daca

Browse files
committed
add add pre-commit
1 parent cde4ef1 commit df7daca

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-yaml
6+
- id: check-toml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
10+
- repo: https://github.com/codespell-project/codespell
11+
# Configuration for codespell is in pyproject.toml
12+
rev: v2.3.0
13+
hooks:
14+
- id: codespell
15+
additional_dependencies:
16+
- tomli
17+
18+
- repo: local
19+
hooks:
20+
- id: format
21+
name: Format Python
22+
entry: uv
23+
args: [run, ruff, format]
24+
language: system
25+
types: [python]
26+
pass_filenames: false
27+
- id: lint
28+
name: lint Python
29+
entry: uv
30+
args: [run, ruff, check, --fix]
31+
language: system
32+
types: [python]
33+
pass_filenames: false

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = [
88
"asyncpg>=0.30.0",
9-
"asyncpg-stubs>=0.30.2",
109
"devtools>=0.12.2",
1110
"fastapi>=0.115.14",
1211
"logfire[asyncpg,fastapi,httpx]>=3.21.1",
1312
"pydantic-ai>=0.3.4",
1413
]
1514

15+
[dependency-groups]
16+
dev = ["ruff>=0.12.2", "asyncpg-stubs>=0.30.2"]
17+
1618
[tool.ruff]
1719
line-length = 120
1820
target-version = "py39"

uv.lock

Lines changed: 37 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)