@@ -28,6 +28,7 @@ dev = [
2828 " flake8" ,
2929 " flake8-import-order" ,
3030 " rstcheck[sphinx]" ,
31+ " ruff" ,
3132 " sphinx" ,
3233]
3334
@@ -51,3 +52,49 @@ yamllint = ["conf/*.yaml"]
5152
5253[tool .setuptools .dynamic ]
5354version = {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+ " SIM103" , # Return the negated condition directly
86+ " SIM105" , # Use `contextlib.suppress(KeyError)` instead of `try`-`except`-`pass`
87+ " SIM108" , # Use ternary operator instead of `if`-`else`-block
88+ " SIM114" , # Combine `if` branches using logical `or` operator
89+ " SIM117" , # Use a single `with` statement with multiple contexts
90+ " FURB105" , # Unnecessary empty string passed to `print`
91+ " RUF001" , # String contains ambiguous Unicode characters
92+ " RUF002" , # Docstring contains ambiguous Unicode characters
93+ " RUF003" , # Comment contains ambiguous Unicode characters
94+ " RUF005" , # Consider unpacking instead of concatenation
95+ " RUF100" , # Unused `noqa` directive
96+ ]
97+
98+ [tool .ruff .lint .isort ]
99+ force-sort-within-sections = true
100+ known-third-party = [" tests" ]
0 commit comments