Skip to content

Commit 7092fbb

Browse files
committed
add pre-commit hook
1 parent 580e37a commit 7092fbb

3 files changed

Lines changed: 2251 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.14.0
4+
hooks:
5+
- id: ruff
6+
args: [--fix, --exit-non-zero-on-fix]
7+
- repo: https://github.com/psf/black
8+
rev: 25.9.0
9+
hooks:
10+
- id: black
11+
language_version: python3.11

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,32 @@ dependencies = []
1212
[build-system]
1313
requires = ["uv_build>=0.9.0,<0.10.0"]
1414
build-backend = "uv_build"
15+
16+
[dependency-groups]
17+
dev = [
18+
"black>=24.8.0",
19+
"matplotlib>=3.7.5",
20+
"numpy>=1.24.4",
21+
"pre-commit>=3.5.0",
22+
"pytest>=8.3.5",
23+
"ruff>=0.14.0",
24+
]
25+
26+
[tool.black]
27+
line-length = 88
28+
target-version = ["py311"]
29+
30+
[tool.ruff]
31+
target-version = "py311"
32+
line-length = 88
33+
34+
[tool.ruff.lint]
35+
select = [
36+
"E",
37+
"F",
38+
"I",
39+
]
40+
41+
[tool.ruff.format]
42+
quote-style = "double"
43+
indent-style = "space"

0 commit comments

Comments
 (0)