-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathruff.toml
More file actions
48 lines (43 loc) · 1.58 KB
/
ruff.toml
File metadata and controls
48 lines (43 loc) · 1.58 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
# Ruff configuration
####################
exclude = [
".git",
".netbox",
".ruff_cache",
".venv",
"venv",
]
line-length = 120
indent-width = 4
respect-gitignore = true
target-version = "py312"
[lint]
preview = true
extend-select = [
"E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent)
"E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces)
"E3", # pycodestyle errors: blank lines / spacing around definitions
"E501", # pycodestyle: line too long (enforced with `line-length` above)
"W", # pycodestyle warnings (various style warnings, often whitespace/newlines)
"I", # import sorting (isort-equivalent)
"RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return)
"UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms)
"RUF022", # ruff: enforce sorted `__all__` lists
]
ignore = [
"E266", # pycodestyle: too many leading '#' for block comment
"S110" # ruff try-except-pass
]
[lint.per-file-ignores]
"configuration/*" = [
"E501", # pycodestyle: line too long (enforced with `line-length` above)
"E722" # pycodestyle: do not use bare `except`
]
"docker/*" = [
"E501", # pycodestyle: line too long (enforced with `line-length` above)
"E722" # pycodestyle: do not use bare `except`
]
[format]
quote-style = "single"
indent-style = "space"
line-ending = "lf"