@@ -61,6 +61,7 @@ skip_covered = true
6161
6262[tool .doc8 ]
6363ignore = [
64+ " D000" , # see PyCQA/doc8#125
6465 " D001" , # one sentence per line, so max length doesn't make sense
6566]
6667
@@ -82,51 +83,64 @@ exclude = [
8283
8384[tool .ruff ]
8485line-length = 79
85- select = [
86- " ANN " , " B " , " D " , " D204 " , " E " , " F " , " Q " , " RUF " , " SIM " , " TCH " , " UP " , " W " ,
87- ]
86+
87+ [ tool . ruff . lint ]
88+ select = [ " ALL " ]
8889ignore = [
89- # Wat, type annotations for self and cls, why is this a thing?
90- " ANN101" ,
91- " ANN102" ,
92- # Private annotations are fine to leave out.
93- " ANN202" ,
94- # I don't know how to more properly annotate "pass along all arguments".
95- " ANN401" ,
96- # It's totally OK to call functions for default arguments.
97- " B008" ,
98- # raise SomeException(...) is fine.
99- " B904" ,
100- # There's no need for explicit strict, this is simply zip's default behavior.
101- " B905" ,
102- # It's fine to not have docstrings for magic methods.
103- " D105" ,
104- # __init__ especially doesn't need a docstring
105- " D107" ,
106- # This rule makes diffs uglier when expanding docstrings (and it's uglier)
107- " D200" ,
108- # No blank lines before docstrings.
109- " D203" ,
110- # Start docstrings on the second line.
111- " D212" ,
112- # This rule misses sassy docstrings ending with ! or ?.
113- " D400" ,
114- # Section headers should end with a colon not a newline
115- " D406" ,
116- # Underlines aren't needed
117- " D407" ,
118- # Plz spaces after section headers
119- " D412" ,
120- # Not sure what heuristic this uses, but it seems easy for it to be wrong.
121- " SIM300" ,
122- # We support 3.8 + 3.9
123- " UP007" ,
90+ " A001" , # It's fine to shadow builtins
91+ " A002" ,
92+ " A003" ,
93+ " ARG" , # This is all wrong whenever an interface is involved
94+ " ANN" , # Just let the type checker do this
95+ " B006" , # Mutable arguments require care but are OK if you don't abuse them
96+ " B008" , # It's totally OK to call functions for default arguments.
97+ " B904" , # raise SomeException(...) is fine.
98+ " B905" , # No need for explicit strict, this is simply zip's default behavior
99+ " C408" , # Calling dict is fine when it saves quoting the keys
100+ " C901" , # Not really something to focus on
101+ " D105" , # It's fine to not have docstrings for magic methods.
102+ " D107" , # __init__ especially doesn't need a docstring
103+ " D200" , # This rule makes diffs uglier when expanding docstrings
104+ " D203" , # No blank lines before docstrings.
105+ " D212" , # Start docstrings on the second line.
106+ " D400" , # This rule misses sassy docstrings ending with ! or ?
107+ " D401" , # This rule is too flaky.
108+ " D406" , # Section headers should end with a colon not a newline
109+ " D407" , # Underlines aren't needed
110+ " D412" , # Plz spaces after section headers
111+ " EM101" , # These don't bother me, it's fine there's some duplication.
112+ " EM102" ,
113+ " FBT" , # It's worth avoiding boolean args but I don't care to enforce it
114+ " FIX" , # Yes thanks, if I could it wouldn't be there
115+ " N" , # These naming rules are silly
116+ " PLR0912" , # These metrics are fine to be aware of but not to enforce
117+ " PLR0913" ,
118+ " PLR0915" ,
119+ " PLW2901" , # Shadowing for loop variables is occasionally fine.
120+ " PT006" , # pytest parametrize takes strings as well
121+ " PYI025" , # wat, I'm not confused, thanks.
122+ " RET502" , # Returning None implicitly is fine
123+ " RET503" ,
124+ " RET505" , # These push you to use `if` instead of `elif`, but for no reason
125+ " RET506" ,
126+ " RSE102" , # Ha, what, who even knew you could leave the parens off. But no.
127+ " SIM300" , # Not sure what heuristic this uses, but it's easily incorrect
128+ " SLF001" , # Private usage within this package itself is fine
129+ " TD" , # These TODO style rules are also silly
130+ " UP007" , # We support 3.8 + 3.9
124131]
125132
126- [tool .ruff .flake8-quotes ]
133+ [tool .ruff .lint .flake8-pytest-style ]
134+ mark-parentheses = false
135+
136+ [tool .ruff .lint .flake8-quotes ]
127137docstring-quotes = " double"
128138
129- [tool .ruff .per-file-ignores ]
130- "noxfile.py" = [" ANN" , " D100" ]
131- "docs/*" = [" ANN" , " D" ]
132- "referencing_loaders/tests/*" = [" ANN" , " D" , " RUF012" ]
139+ [tool .ruff .lint .isort ]
140+ combine-as-imports = true
141+ from-first = true
142+
143+ [tool .ruff .lint .per-file-ignores ]
144+ "noxfile.py" = [" ANN" , " D100" , " S101" , " T201" ]
145+ "docs/*" = [" ANN" , " D" , " INP001" ]
146+ "referencing_loaders/tests/*" = [" ANN" , " D" , " RUF012" , " S" , " PLR" , " TRY" ]
0 commit comments