Skip to content

Commit fbc1509

Browse files
committed
Use ruff formatter
1 parent 5ce4f87 commit fbc1509

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ repos:
2525
files: \.(md|rst|yml|yaml)
2626
args: [--prose-wrap=preserve]
2727

28-
- repo: https://github.com/psf/black
29-
rev: 552baf822992936134cbd31a38f69c8cfe7c0f05 # frozen: 24.3.0
30-
hooks:
31-
- id: black
32-
33-
- repo: https://github.com/adamchainz/blacken-docs
34-
rev: 960ead214cd1184149d366c6d27ca6c369ce46b6 # frozen: 1.16.0
35-
hooks:
36-
- id: blacken-docs
37-
3828
- repo: https://github.com/MarcoGorelli/cython-lint
3929
rev: 582556b052c898dc484a981bea48de3284a4b8ee # frozen: v0.16.0
4030
hooks:
@@ -46,6 +36,7 @@ repos:
4636
hooks:
4737
- id: ruff
4838
args: [--fix, --exit-non-zero-on-fix]
39+
- id: ruff-format
4940

5041
- repo: https://github.com/codespell-project/codespell
5142
rev: "6e41aba91fb32e9feb741a6258eefeb9c6e4a482" # frozen: v2.2.6

ruff.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
target-version = "py310"
2+
3+
[lint]
14
select = [
25
"UP", # pyupgrade
36
"C4", # flake8-comprehensions
47
"E713", # use 'key not in list'
8+
"NPY201", # NumPy 2 compatibility
59
"PIE", # flake8-pie
610
"PGH003", # forbid blanket 'type: ignore' comments
711
"PLR0402", # useless import alias
@@ -12,4 +16,5 @@ select = [
1216
"SIM2", # simplify boolean comparisons
1317
]
1418

15-
target-version = "py310"
19+
[format]
20+
docstring-code-format = true

0 commit comments

Comments
 (0)