-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathruff.toml
More file actions
70 lines (60 loc) · 2.11 KB
/
ruff.toml
File metadata and controls
70 lines (60 loc) · 2.11 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
exclude = [
".ebextensions",
".git",
".idea",
".platform",
".pytest_cache",
".ruff_cache",
".tox",
"__pycache__",
"*-local.py",
"dist",
"fixtures",
"node_modules",
"public",
"src",
"venv"
]
extend-exclude = ["config/development-local.py"]
line-length = 150
indent-width = 4
# Python version
target-version = "py311"
[lint]
select = ['ALL']
# TODO: Rules we want to enable:
# ARG002, B012, BLE001, E721, FURB136, ISC002, PLR1730, PLW0120, RET504, RET507, RUF010, S104, S105, S607, SIM103,
# SIM110, SIM117, TRY002, TRY301, TRY400, TRY401, UP017
# Rules to ignore
ignore = [
"ANN", "ANN202", "ARG001", "ARG002", "B007", "B012", "B023", "B904", "B905", "BLE001", "C401", "C402", "C403",
"C408", "C416", "C417", "D10", "D203", "D211", "D212", "D213", "DTZ", "E721", "E731", "EM101", "EM102", "FBT002",
"FBT003", "FIX002", "FLY002", "FURB136", "G004", "ICN001", "INP001", "ISC002", "PERF102", "PERF401",
"PIE804", "PLC0206", "PLC0415", "PLC1802", "PLR1714", "PLR1730", "PLR1736", "PLR2004", "PLR5501", "PLW0120",
"PLW0603", "PLW2901", "PTH", "Q000", "RET503", "RET504", "RET505", "RET506", "RET506", "RET507", "RET508",
"RUF005", "RUF010", "RUF012", "RUF015", "S101", "S104", "S105", "S108", "S311", "S603", "S607", "S608", "SIM102",
"SIM103", "SIM108", "SIM110", "SIM115", "SIM117", "SIM118", "SIM210", "SIM401", "SIM910", "SLF001", "TD002",
"TD003", "TRY002", "TRY003", "TRY201", "TRY300", "TRY301", "TRY400", "TRY401", "UP012", "UP015", "UP017", "UP028",
"W605"
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[lint.pylint]
max-args = 21
max-branches = 15
max-statements = 60
[lint.mccabe]
max-complexity = 13
[format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[lint.per-file-ignores]
"xena/*" = [
"ARG", "B010", "B018", "C419", "C901", "ERA001", "PLE0704", "PLR091", "PLR1704", "PT026", "Q004", "RUF", "SIM",
"TD004", "TRY", "UP"
]