@@ -8,9 +8,9 @@ source = "vcs"
88[project ]
99name = " sphinx_json_schema_spec"
1010description = " Sphinx support for the JSON Schema specifications"
11+ requires-python = " >=3.11"
1112readme = " README.rst"
1213license = {text = " MIT" }
13- requires-python = " >=3.11"
1414keywords = [" json schema" , " jsonschema" , " data validation" , " sphinx" , " json" ]
1515authors = [
1616@@ -31,61 +31,92 @@ classifiers = [
3131 " Topic :: File Formats :: JSON :: JSON Schema" ,
3232]
3333dynamic = [" version" ]
34-
3534dependencies = [
3635 " lxml" ,
3736 " sphinx>=5.1.1" ,
3837]
3938
4039[project .urls ]
41- Documentation = " https://sphinx-json-schema-spec.readthedocs.io/"
4240Homepage = " https://github.com/python-jsonschema/sphinx-json-schema-spec"
41+ Documentation = " https://sphinx-json-schema-spec.readthedocs.io/"
4342Issues = " https://github.com/python-jsonschema/sphinx-json-schema-spec/issues/"
4443Funding = " https://github.com/sponsors/Julian"
4544Source = " https://github.com/python-jsonschema/sphinx-json-schema-spec"
4645
4746[tool .doc8 ]
4847ignore = [
48+ " D000" , # see PyCQA/doc8#125
4949 " D001" , # one sentence per line, so max length doesn't make sense
5050]
5151
5252[tool .isort ]
5353combine_as_imports = true
54+ ensure_newline_before_comments = true
5455from_first = true
5556include_trailing_comma = true
5657multi_line_output = 3
58+ use_parentheses = true
5759
5860[tool .ruff ]
5961line-length = 79
60- select = [" B " , " D " , " E " , " F " , " Q " , " UP " , " W " ]
62+ select = [" ALL " ]
6163ignore = [
62- # raise SomeException(...) is fine.
63- " B904" ,
64- # It's fine to not have docstrings for magic methods.
65- " D105" ,
66- # This rule makes diffs uglier when expanding docstrings (and it's uglier)
67- " D200" ,
68- # No blank lines before docstrings.
69- " D203" ,
70- # Start docstrings on the second line.
71- " D212" ,
72- # This rule misses sassy docstrings ending with ! or ?.
73- " D400" ,
74- # Section headers should end with a colon not a newline
75- " D406" ,
76- # Underlines aren't needed
77- " D407" ,
78- # Plz spaces after section headers
79- " D412" ,
80- # We support 3.8 + 3.9
81- " UP007" ,
64+ " A001" , # It's fine to shadow builtins
65+ " A002" ,
66+ " A003" ,
67+ " ARG" , # This is all wrong whenever an interface is involved
68+ " ANN" , # Just let the type checker do this
69+ " B006" , # Mutable arguments require care but are OK if you don't abuse them
70+ " B008" , # It's totally OK to call functions for default arguments.
71+ " B904" , # raise SomeException(...) is fine.
72+ " B905" , # No need for explicit strict, this is simply zip's default behavior
73+ " C408" , # Calling dict is fine when it saves quoting the keys
74+ " C901" , # Not really something to focus on
75+ " D105" , # It's fine to not have docstrings for magic methods.
76+ " D107" , # __init__ especially doesn't need a docstring
77+ " D200" , # This rule makes diffs uglier when expanding docstrings
78+ " D203" , # No blank lines before docstrings.
79+ " D212" , # Start docstrings on the second line.
80+ " D400" , # This rule misses sassy docstrings ending with ! or ?
81+ " D401" , # This rule is too flaky.
82+ " D406" , # Section headers should end with a colon not a newline
83+ " D407" , # Underlines aren't needed
84+ " D412" , # Plz spaces after section headers
85+ " EM101" , # These don't bother me, it's fine there's some duplication.
86+ " EM102" ,
87+ " FBT" , # It's worth avoiding boolean args but I don't care to enforce it
88+ " FIX" , # Yes thanks, if I could it wouldn't be there
89+ " I001" , # We can't yet use ruff's isort
90+ " N" , # These naming rules are silly
91+ " PLR0912" , # These metrics are fine to be aware of but not to enforce
92+ " PLR0913" ,
93+ " PLR0915" ,
94+ " PLW2901" , # Shadowing for loop variables is occasionally fine.
95+ " PT006" , # pytest parametrize takes strings as well
96+ " PYI025" , # wat, I'm not confused, thanks.
97+ " RET502" , # Returning None implicitly is fine
98+ " RET503" ,
99+ " RET505" , # These push you to use `if` instead of `elif`, but for no reason
100+ " RET506" ,
101+ " RSE102" , # Ha, what, who even knew you could leave the parens off. But no.
102+ " S" , # Security warnings with lots of false positives, as usual
103+ " SIM300" , # Not sure what heuristic this uses, but it's easily incorrect
104+ " SLF001" , # Private usage within this package itself is fine
105+ " TD" , # These TODO style rules are also silly
82106]
83107extend-exclude = [" suite" ]
84108
109+ [tool .ruff .lint .flake8-pytest-style ]
110+ mark-parentheses = false
111+
85112[tool .ruff .flake8-quotes ]
86113docstring-quotes = " double"
87114
115+ [tool .ruff .lint .isort ]
116+ combine-as-imports = true
117+ from-first = true
118+
88119[tool .ruff .per-file-ignores ]
89- "docs/* " = [" ANN" , " D " ]
90- "sphinx_json_schema_spec/tests/ *" = [" ANN" , " D" ]
91- "noxfile.py " = [" ANN" , " D" ]
120+ "noxfile.py " = [" ANN" , " D100 " , " S101 " , " T201 " ]
121+ "docs/ *" = [" ANN" , " D" , " INP001 " ]
122+ "sphinx_json_schema_spec/tests/* " = [" ANN" , " D" , " RUF012 " , " S " , " PLR " , " TRY " ]
0 commit comments