Skip to content

Commit 4a48562

Browse files
authored
chore: update & add Ruff config (#37)
* chore: update & add Ruff config Signed-off-by: Henry Schreiner <[email protected]> * Update .pre-commit-config.yaml --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent ef09a5f commit 4a48562

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
rev: "v0.0.275"
1818
hooks:
1919
- id: ruff
20-
args: ["--fix", "--show-fixes"]
20+
args: [--config=ruff.toml, --fix, --show-fixes]
2121

2222
- repo: https://github.com/psf/black
2323
rev: "23.3.0"

ruff.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
select = [
2+
"E", "F", "W", # flake8
3+
"B", # flake8-bugbear
4+
"I", # isort
5+
"ARG", # flake8-unused-arguments
6+
"C4", # flake8-comprehensions
7+
"EM", # flake8-errmsg
8+
"ICN", # flake8-import-conventions
9+
"ISC", # flake8-implicit-str-concat
10+
"G", # flake8-logging-format
11+
"PGH", # pygrep-hooks
12+
"PIE", # flake8-pie
13+
"PL", # pylint
14+
"PTH", # flake8-use-pathlib
15+
"RET", # flake8-return
16+
"RUF", # Ruff-specific
17+
"SIM", # flake8-simplify
18+
"UP", # pyupgrade
19+
"YTT", # flake8-2020
20+
"EXE", # flake8-executable
21+
"NPY", # NumPy specific rules
22+
"PD", # pandas-vet
23+
]
24+
extend-ignore = [
25+
"PLR", # Design related pylint codes
26+
]
27+
target-version = "py37"
28+
flake8-unused-arguments.ignore-variadic-names = true

0 commit comments

Comments
 (0)