-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathruff.toml
More file actions
53 lines (50 loc) · 1.51 KB
/
Copy pathruff.toml
File metadata and controls
53 lines (50 loc) · 1.51 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
cache-dir = "/tmp/.cache/ruff"
fix-only = true
line-length = 100
target-version = "py37"
[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 removes `+` between string literals. Implicit concatenation is an
# extremely footgunny anti-feature of Python. Ideally we'd automatically add
# `+` but no such rule exists right now
"ISC003",
# This rule strips `noqa` comments that Ruff thinks are unused, but other
# linters (e.g. Pylint) in consumer repos might still be relying on them
"RUF100",
# This rule inexplicably converts `elif a or isinstance(b, C) or isinstance
# (b, D)` to `elif isinstance(b, (C, D))`, buggily removing condition `a`
"SIM101",
# This rule correctly preserves logic but will delete comments :|
"SIM114",
# This rule adds visual noise and hurts readability/greppability
"SIM905",
]
# https://docs.astral.sh/ruff/rules/
select = [
"B",
"C4",
"D",
"E",
"F",
"I",
"ISC",
"PERF",
"PIE",
"PL",
"Q",
"RUF",
"SIM",
"UP",
]
[lint.isort]
combine-as-imports = true
# We force Apiary generated clients to be sorted as external libraries to prevent
# thrashing between local and CI environments.
known-third-party = ["*_backend_client"]
[lint.pydocstyle]
convention = "pep257"