-
Notifications
You must be signed in to change notification settings - Fork 13
/
.ruff.toml
43 lines (38 loc) · 1.1 KB
/
.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
42
43
# --- General config ---
target-version = "py38"
# --- Linting config ---
[lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"DTZ", # flake8-datetimez
"EXE", # flake8-executable
"FBT", # flake8-boolean-trap
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"PL", # Pylint
"PYI", # flake8-pyi
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"SIM105", # contextlib.supress (3.7 feature)
]
[lint.per-file-ignores]
"tests/*" = [
"S", # Assert okay in tests
"PLR2004", # Magic value comparison is actually desired in tests
]
# --- Tool-related config ---
[lint.isort]
known-third-party = ["validate_pyproject._vendor"]
[lint.pylint]
allow-magic-value-types = ["int", "str"]