@@ -8,9 +8,9 @@ source = "vcs"
88[project ]
99name = " referencing"
1010description = " JSON Referencing + Python"
11+ requires-python = " >=3.8"
1112readme = " README.rst"
1213license = {text = " MIT" }
13- requires-python = " >=3.8"
1414keywords = [" json" , " referencing" , " jsonschema" , " openapi" , " asyncapi" ]
1515authors = [
1616 {email = " Julian+referencing@GrayVines.com" },
@@ -66,6 +66,7 @@ skip_covered = true
6666
6767[tool .doc8 ]
6868ignore = [
69+ " D000" , # see PyCQA/doc8#125
6970 " D001" , # one sentence per line, so max length doesn't make sense
7071]
7172
@@ -87,52 +88,64 @@ exclude = [
8788
8889[tool .ruff ]
8990line-length = 79
90- select = [
91- " ANN" , " B" , " D" , " D204" , " E" , " F" , " Q" , " RUF" , " SIM" , " TCH" , " UP" , " W" ,
92- ]
91+ select = [" ALL" ]
9392ignore = [
94- # Wat, type annotations for self and cls, why is this a thing?
95- " ANN101" ,
96- " ANN102" ,
97- # Private annotations are fine to leave out.
98- " ANN202" ,
99- # I don't know how to more properly annotate "pass along all arguments".
100- " ANN401" ,
101- # It's totally OK to call functions for default arguments.
102- " B008" ,
103- # raise SomeException(...) is fine.
104- " B904" ,
105- # There's no need for explicit strict, this is simply zip's default behavior.
106- " B905" ,
107- # It's fine to not have docstrings for magic methods.
108- " D105" ,
109- # __init__ especially doesn't need a docstring
110- " D107" ,
111- # This rule makes diffs uglier when expanding docstrings (and it's uglier)
112- " D200" ,
113- # No blank lines before docstrings.
114- " D203" ,
115- # Start docstrings on the second line.
116- " D212" ,
117- # This rule misses sassy docstrings ending with ! or ?.
118- " D400" ,
119- # Section headers should end with a colon not a newline
120- " D406" ,
121- # Underlines aren't needed
122- " D407" ,
123- # Plz spaces after section headers
124- " D412" ,
125- # Not sure what heuristic this uses, but it seems easy for it to be wrong.
126- " SIM300" ,
127- # We support 3.8 + 3.9
128- " UP007" ,
93+ " A001" , # It's fine to shadow builtins
94+ " A002" ,
95+ " A003" ,
96+ " ARG" , # This is all wrong whenever an interface is involved
97+ " ANN" , # Just let the type checker do this
98+ " B008" , # It's totally OK to call functions for default arguments.
99+ " B904" , # raise SomeException(...) is fine.
100+ " B905" , # No need for explicit strict, this is simply zip's default behavior
101+ " C408" , # Calling dict is fine when it saves quoting the keys
102+ " C901" , # Not really something to focus on
103+ " D105" , # It's fine to not have docstrings for magic methods.
104+ " D107" , # __init__ especially doesn't need a docstring
105+ " D200" , # This rule makes diffs uglier when expanding docstrings
106+ " D203" , # No blank lines before docstrings.
107+ " D212" , # Start docstrings on the second line.
108+ " D400" , # This rule misses sassy docstrings ending with ! or ?
109+ " D401" , # This rule is too flaky.
110+ " D406" , # Section headers should end with a colon not a newline
111+ " D407" , # Underlines aren't needed
112+ " D412" , # Plz spaces after section headers
113+ " EM101" , # These don't bother me, it's fine there's some duplication.
114+ " EM102" ,
115+ " FBT" , # It's worth avoiding boolean args but I don't care to enforce it
116+ " FIX" , # Yes thanks, if I could it wouldn't be there
117+ " I001" , # We can't yet use ruff's isort
118+ " N" , # These naming rules are silly
119+ " PLR0912" , # These metrics are fine to be aware of but not to enforce
120+ " PLR0913" ,
121+ " PLR0915" ,
122+ " PLW2901" , # Shadowing for loop variables is occasionally fine.
123+ " PT006" , # pytest parametrize takes strings as well
124+ " PYI025" , # wat, I'm not confused, thanks.
125+ " RET502" , # Returning None implicitly is fine
126+ " RET503" ,
127+ " RET505" , # These push you to use `if` instead of `elif`, but for no reason
128+ " RET506" ,
129+ " RSE102" , # Ha, what, who even knew you could leave the parens off. But no.
130+ " SIM300" , # Not sure what heuristic this uses, but it's easily incorrect
131+ " SLF001" , # Private usage within this package itself is fine
132+ " TD" , # These TODO style rules are also silly
133+ " UP007" , # We support 3.8 + 3.9
129134]
130135extend-exclude = [" suite" ]
131136
137+ [tool .ruff .lint .flake8-pytest-style ]
138+ mark-parentheses = false
139+
132140[tool .ruff .flake8-quotes ]
133141docstring-quotes = " double"
134142
143+ [tool .ruff .lint .isort ]
144+ combine-as-imports = true
145+ from-first = true
146+
135147[tool .ruff .per-file-ignores ]
136- "noxfile.py" = [" ANN" , " D100" ]
137- "docs/*" = [" ANN" , " D" ]
138- "referencing/tests/*" = [" ANN" , " D" , " RUF012" ]
148+ "noxfile.py" = [" ANN" , " D100" , " S101" , " T201" ]
149+ "docs/*" = [" ANN" , " D" , " INP001" ]
150+ "referencing/tests/*" = [" ANN" , " D" , " RUF012" , " S" , " PLR" , " TRY" ]
151+ "referencing/typing.py" = [" PLC0414" ]
0 commit comments