Skip to content

Commit 1004ec2

Browse files
authored
chore: use Ruff format (#47)
* chore: use ruff-format & modernize config Signed-off-by: Henry Schreiner <[email protected]> * chore: bump version of Ruff Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 668bc1b commit 1004ec2

File tree

3 files changed

+12
-39
lines changed

3 files changed

+12
-39
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: "v0.3.7"
17+
rev: "v0.4.0"
1818
hooks:
1919
- id: ruff
20-
args: [--config=ruff.toml, --fix, --show-fixes]
21-
22-
- repo: https://github.com/psf/black-pre-commit-mirror
23-
rev: "24.4.0"
24-
hooks:
25-
- id: black
20+
args: [--fix, --show-fixes]
21+
- id: ruff-format
2622

2723
- repo: https://github.com/codespell-project/codespell
2824
rev: "v2.2.6"

.ruff.toml

Lines changed: 0 additions & 27 deletions
This file was deleted.

ruff.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
select = [
2-
"E", "F", "W", # flake8
1+
target-version = "py37"
2+
line-length = 88
3+
4+
[lint]
5+
extend-select = [
36
"B", # flake8-bugbear
47
"I", # isort
58
"ARG", # flake8-unused-arguments
@@ -21,8 +24,9 @@ select = [
2124
"NPY", # NumPy specific rules
2225
"PD", # pandas-vet
2326
]
24-
extend-ignore = [
25-
"PLR", # Design related pylint codes
27+
ignore = [
28+
"PLR09", # Design related pylint codes
29+
"PLR2004", # Magic values
30+
"ISC001", # Conflicts with formatter
2631
]
27-
target-version = "py37"
2832
flake8-unused-arguments.ignore-variadic-names = true

0 commit comments

Comments
 (0)