@@ -3,3 +3,66 @@ combine_as_imports = true
33from_first = true
44include_trailing_comma = true
55multi_line_output = 3
6+
7+ [tool .ruff ]
8+ line-length = 79
9+
10+ [tool .ruff .lint ]
11+ select = [" ALL" ]
12+ ignore = [
13+ " A001" , # It's fine to shadow builtins
14+ " A002" ,
15+ " A003" ,
16+ " ARG" , # This is all wrong whenever an interface is involved
17+ " ANN" , # Just let the type checker do this
18+ " B006" , # Mutable arguments require care but are OK if you don't abuse them
19+ " B008" , # It's totally OK to call functions for default arguments.
20+ " B904" , # raise SomeException(...) is fine.
21+ " B905" , # No need for explicit strict, this is simply zip's default behavior
22+ " C408" , # Calling dict is fine when it saves quoting the keys
23+ " C901" , # Not really something to focus on
24+ " D105" , # It's fine to not have docstrings for magic methods.
25+ " D107" , # __init__ especially doesn't need a docstring
26+ " D200" , # This rule makes diffs uglier when expanding docstrings
27+ " D203" , # No blank lines before docstrings.
28+ " D212" , # Start docstrings on the second line.
29+ " D400" , # This rule misses sassy docstrings ending with ! or ?
30+ " D401" , # This rule is too flaky.
31+ " D406" , # Section headers should end with a colon not a newline
32+ " D407" , # Underlines aren't needed
33+ " D412" , # Plz spaces after section headers
34+ " EM101" , # These don't bother me, it's fine there's some duplication.
35+ " EM102" ,
36+ " FBT" , # It's worth avoiding boolean args but I don't care to enforce it
37+ " FIX" , # Yes thanks, if I could it wouldn't be there
38+ " N" , # These naming rules are silly
39+ " PLR0912" , # These metrics are fine to be aware of but not to enforce
40+ " PLR0913" ,
41+ " PLR0915" ,
42+ " PLW2901" , # Shadowing for loop variables is occasionally fine.
43+ " PT006" , # pytest parametrize takes strings as well
44+ " PYI025" , # wat, I'm not confused, thanks.
45+ " RET502" , # Returning None implicitly is fine
46+ " RET503" ,
47+ " RET505" , # These push you to use `if` instead of `elif`, but for no reason
48+ " RET506" ,
49+ " RSE102" , # Ha, what, who even knew you could leave the parens off. But no.
50+ " SIM300" , # Not sure what heuristic this uses, but it's easily incorrect
51+ " SLF001" , # Private usage within this package itself is fine
52+ " TD" , # These TODO style rules are also silly
53+ " UP007" , # We support 3.8 + 3.9
54+ ]
55+
56+ [tool .ruff .lint .flake8-pytest-style ]
57+ mark-parentheses = false
58+
59+ [tool .ruff .lint .flake8-quotes ]
60+ docstring-quotes = " double"
61+
62+ [tool .ruff .lint .isort ]
63+ combine-as-imports = true
64+ from-first = true
65+
66+ [tool .ruff .lint .per-file-ignores ]
67+ "noxfile.py" = [" ANN" , " D100" , " S101" , " T201" ]
68+ "test_*.py" = [" ANN" , " D" , " RUF012" , " S" , " PLR" , " TRY" ]
0 commit comments