@@ -8,9 +8,9 @@ source = "vcs"
8
8
[project ]
9
9
name = " sphinx_json_schema_spec"
10
10
description = " Sphinx support for the JSON Schema specifications"
11
+ requires-python = " >=3.11"
11
12
readme = " README.rst"
12
13
license = {text = " MIT" }
13
- requires-python = " >=3.11"
14
14
keywords = [" json schema" , " jsonschema" , " data validation" , " sphinx" , " json" ]
15
15
authors = [
16
16
@@ -31,61 +31,92 @@ classifiers = [
31
31
" Topic :: File Formats :: JSON :: JSON Schema" ,
32
32
]
33
33
dynamic = [" version" ]
34
-
35
34
dependencies = [
36
35
" lxml" ,
37
36
" sphinx>=5.1.1" ,
38
37
]
39
38
40
39
[project .urls ]
41
- Documentation = " https://sphinx-json-schema-spec.readthedocs.io/"
42
40
Homepage = " https://github.com/python-jsonschema/sphinx-json-schema-spec"
41
+ Documentation = " https://sphinx-json-schema-spec.readthedocs.io/"
43
42
Issues = " https://github.com/python-jsonschema/sphinx-json-schema-spec/issues/"
44
43
Funding = " https://github.com/sponsors/Julian"
45
44
Source = " https://github.com/python-jsonschema/sphinx-json-schema-spec"
46
45
47
46
[tool .doc8 ]
48
47
ignore = [
48
+ " D000" , # see PyCQA/doc8#125
49
49
" D001" , # one sentence per line, so max length doesn't make sense
50
50
]
51
51
52
52
[tool .isort ]
53
53
combine_as_imports = true
54
+ ensure_newline_before_comments = true
54
55
from_first = true
55
56
include_trailing_comma = true
56
57
multi_line_output = 3
58
+ use_parentheses = true
57
59
58
60
[tool .ruff ]
59
61
line-length = 79
60
- select = [" B " , " D " , " E " , " F " , " Q " , " UP " , " W " ]
62
+ select = [" ALL " ]
61
63
ignore = [
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
82
106
]
83
107
extend-exclude = [" suite" ]
84
108
109
+ [tool .ruff .lint .flake8-pytest-style ]
110
+ mark-parentheses = false
111
+
85
112
[tool .ruff .flake8-quotes ]
86
113
docstring-quotes = " double"
87
114
115
+ [tool .ruff .lint .isort ]
116
+ combine-as-imports = true
117
+ from-first = true
118
+
88
119
[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