-
Notifications
You must be signed in to change notification settings - Fork 9
/
ruff.toml
41 lines (38 loc) · 912 Bytes
/
ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cache-dir = "/tmp/.cache/ruff"
fix-only = true
line-length = 100
target-version = "py37"
[pydocstyle]
convention = "pep257"
[isort]
combine-as-imports = true
[lint]
ignore = [
# We disable Ruff's `unused-import` for now in favor of autoflake <2 because
# the latter preserves imports that are unused in code but "used" in type
# hint comments. Ruff also seems to have an unfortunate bug: it can end up
# moving a `pylint: disable=unused-import` comment from one import to another
"F401",
# This rule inexplicably converts `elif a or isinstance(b, C) or isinstance
# (b, D)` to `elif isinstance(b, (C, D))`, buggily removing condition `a`
"PLR1701",
# This rule correctly preserves logic but will delete comments :|
"SIM114",
]
# https://docs.astral.sh/ruff/rules/
select = [
"B",
"C4",
"D",
"E",
"F",
"I",
"ISC",
"PERF",
"PIE",
"PL",
"Q",
"RUF",
"SIM",
"UP",
]