Skip to content

Commit d71f843

Browse files
authored
Fix Ruff warnings (#47)
1 parent e72a2a7 commit d71f843

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

ruff.toml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,20 @@ fix-only = true
33
line-length = 100
44
target-version = "py37"
55

6-
[pydocstyle]
7-
convention = "pep257"
8-
9-
[isort]
10-
combine-as-imports = true
11-
# We force Apiary generated clients to be sorted as external libraries to prevent
12-
# thrashing between local and CI environments.
13-
known-third-party = ["*_backend_client"]
14-
156
[lint]
167
ignore = [
8+
# This rule causes Ruff to warn "The following rule may cause conflicts when
9+
# used with the formatter". TODO: Remove after updating to Ruff v0.9?
10+
# https://github.com/astral-sh/ruff/issues/8272#issuecomment-2580594913
11+
"ISC001",
1712
# We disable Ruff's `unused-import` for now in favor of autoflake <2 because
1813
# the latter preserves imports that are unused in code but "used" in type
1914
# hint comments. Ruff also seems to have an unfortunate bug: it can end up
2015
# moving a `pylint: disable=unused-import` comment from one import to another
2116
"F401",
2217
# This rule inexplicably converts `elif a or isinstance(b, C) or isinstance
2318
# (b, D)` to `elif isinstance(b, (C, D))`, buggily removing condition `a`
24-
"PLR1701",
19+
"SIM101",
2520
# This rule correctly preserves logic but will delete comments :|
2621
"SIM114",
2722
]
@@ -42,3 +37,12 @@ select = [
4237
"SIM",
4338
"UP",
4439
]
40+
41+
[lint.isort]
42+
combine-as-imports = true
43+
# We force Apiary generated clients to be sorted as external libraries to prevent
44+
# thrashing between local and CI environments.
45+
known-third-party = ["*_backend_client"]
46+
47+
[lint.pydocstyle]
48+
convention = "pep257"

0 commit comments

Comments
 (0)