Skip to content

Commit 688a508

Browse files
committed
feat: precommit
1 parent 01398b6 commit 688a508

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- hooks:
3+
- id: sync-uv-pre-commit
4+
args:
5+
- "-a ruff:ruff:v:"
6+
- "-a ruff:ruff-format:v:"
7+
- "-a mypy:mypy:v:"
8+
- "-g dev"
9+
repo: https://github.com/phi-friday/sync-uv-pre-commit
10+
rev: v0.6.3
11+
12+
- hooks:
13+
- id: ruff
14+
name: ruff-lint
15+
- id: ruff-format
16+
name: ruff-format
17+
args: [--check]
18+
repo: https://github.com/astral-sh/ruff-pre-commit
19+
rev: v0.12.7
20+
21+
- hooks:
22+
- id: mypy
23+
name: mypy
24+
args: [--config-file=pyproject.toml]
25+
repo: https://github.com/pre-commit/mirrors-mypy
26+
rev: v1.17.1
27+
28+
- hooks:
29+
- id: pyright
30+
name: pyright
31+
always_run: true
32+
types: [python, pyi]
33+
args:
34+
- "--pythonpath=.venv/bin/python"
35+
repo: https://github.com/RobertCraigie/pyright-python
36+
rev: v1.1.403

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dev = [
5656
lint = ["_lint:check", "_lint:format"]
5757
"_lint:check" = "ruff check src --fix"
5858
"_lint:format" = "ruff format src"
59-
mypy = "mypy src --strict"
59+
mypy = "mypy src"
6060
check = "pre-commit run --all-files --show-diff-on-failure"
6161

6262
[build-system]

0 commit comments

Comments
 (0)