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