-
Notifications
You must be signed in to change notification settings - Fork 324
/
.ruff.toml
36 lines (34 loc) · 1.15 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
target-version = "py312"
[lint]
select = [
"B0", # bugbear (all B0* checks enabled by default)
"B904", # bugbear (Within an except clause, raise exceptions with raise ... from err)
"B905", # bugbear (zip() without an explicit strict= parameter set.)
"E", # pycodestyles
"W", # pycodestyles
"F", # pyflakes
"FURB", # refurb
"I", # isort
"PERF", # Perflint
"PGH", # pygrep-hooks
"PLC", # pylint conventions
"PLE", # pylint errors
"PLR", # pylint refactor
"PTH", # Use pathlib
"RUF", # Ruff rules
"TRY", # Exception related lints
"UP", # pyupgrade
]
ignore = [
"E402", # module import not at top of file
"PLR0912", # too many branches
"PLR0915", # too many statements
"PLR2004", # Magic value used in comparison
"TRY003", # Avoid specifying long messages outside the exception class
"UP038", # Use X | Y in isinstance check instead of (X, Y)
"PLR0911", # too many return statements
]
[lint.per-file-ignores]
# Want to preserve compatibility for old Python versions in tools directory so
# disable pyupgrade. Oldest supported version is currently 3.9.
"tools/*" = ["UP"]