Skip to content

Commit 27a32a3

Browse files
style: Enforce ruff rules
1 parent 0a9b431 commit 27a32a3

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

pyproject.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,44 @@ yamllint = ["conf/*.yaml"]
5252

5353
[tool.setuptools.dynamic]
5454
version = {attr = "yamllint.__version__"}
55+
56+
[tool.ruff]
57+
line-length = 79
58+
59+
[tool.ruff.lint]
60+
extend-select = [
61+
"B",
62+
"C4",
63+
"EXE",
64+
"FA",
65+
"ISC",
66+
"LOG",
67+
"G",
68+
"PIE",
69+
"PYI",
70+
"SIM",
71+
"FLY",
72+
"I",
73+
"PERF",
74+
"W",
75+
"PGH",
76+
"PLC",
77+
"PLE",
78+
"UP",
79+
"FURB",
80+
"RUF",
81+
]
82+
ignore = [
83+
"B028", # No explicit `stacklevel` keyword argument found
84+
"SIM102", # Use a single `if` statement instead of nested `if` statements
85+
"SIM108", # Use ternary operator instead of `if`-`else`-block
86+
"SIM114", # Combine `if` branches using logical `or` operator
87+
"SIM117", # Use a single `with` statement with multiple contexts
88+
"FURB105", # Unnecessary empty string passed to `print`
89+
"RUF005", # Consider unpacking instead of concatenation
90+
"RUF100", # Unused `noqa` directive
91+
]
92+
93+
[tool.ruff.lint.per-file-ignores]
94+
"tests/test_cli.py" = ["RUF001"]
95+
"tests/test_decoder.py" = ["RUF001"]

0 commit comments

Comments
 (0)