| 1 |
[build-system] |
| 2 |
requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=6.2"] |
| 3 |
build-backend = "setuptools.build_meta" |
| 4 |
|
| 5 |
[project] |
| 6 |
name = "rstcheck-core" |
| 7 |
requires-python = ">=3.8" |
| 8 |
authors = [ |
| 9 |
{ name = "Steven Myint", email = "[email protected]" }, |
| 10 |
] |
| 11 |
maintainers = [ |
| 12 |
{ name = "Christian Riedel", email = "[email protected]" }, |
| 13 |
] |
| 14 |
description = "Checks syntax of reStructuredText and code blocks nested within it" |
| 15 |
readme = "README.rst" |
| 16 |
license = { text = "MIT" } |
| 17 |
classifiers = [ |
| 18 |
"Topic :: Software Development :: Quality Assurance", |
| 19 |
] |
| 20 |
keywords = ["restructuredtext", "rst", "linter", "static-analysis"] |
| 21 |
dynamic = ["version"] |
| 22 |
|
| 23 |
dependencies = [ |
| 24 |
"docutils >=0.7", |
| 25 |
"pydantic >=2", |
| 26 |
] |
| 27 |
|
| 28 |
[project.optional-dependencies] |
| 29 |
sphinx = ["sphinx >=5.0"] |
| 30 |
toml = ["tomli >=2.0; python_version<='3.10'"] |
| 31 |
yaml = ["pyyaml >= 6.0.0"] |
| 32 |
testing = [ |
| 33 |
"pytest >=7.2", |
| 34 |
"pytest-cov >=3.0", |
| 35 |
"coverage[toml] >=6.0", |
| 36 |
"coverage-conditional-plugin >=0.5", |
| 37 |
"pytest-sugar >=0.9.5", |
| 38 |
"pytest-randomly >=3.0", |
| 39 |
"pytest-mock >=3.7", |
| 40 |
] |
| 41 |
docs = [ |
| 42 |
"sphinx >=5.0, !=7.2.5", |
| 43 |
"m2r2 >=0.3.2", |
| 44 |
"sphinx-rtd-theme >=1.2", |
| 45 |
"sphinx-autodoc-typehints >=1.15", |
| 46 |
"sphinxcontrib-apidoc >=0.3", |
| 47 |
"sphinxcontrib-spelling >=7.3", |
| 48 |
"sphinx-autobuild >=2021.3.14", |
| 49 |
] |
| 50 |
type-check = [ |
| 51 |
"mypy >=1.0", |
| 52 |
"types-docutils >=0.18", |
| 53 |
"types-PyYAML >=6.0.0", |
| 54 |
] |
| 55 |
dev = [ |
| 56 |
"rstcheck-core[sphinx,toml,testing,docs,type-check,yaml]", |
| 57 |
"tox >=3.15", |
| 58 |
] |
| 59 |
|
| 60 |
[project.urls] |
| 61 |
Documentation = "https://rstcheck-core.readthedocs.io/en/latest/" |
| 62 |
Repository = "https://github.com/rstcheck/rstcheck-core" |
| 63 |
Changelog = "https://github.com/rstcheck/rstcheck-core/blob/main/CHANGELOG.md" |
| 64 |
|
| 65 |
[tool.setuptools_scm] |
| 66 |
write_to = "src/rstcheck_core/__version__.py" |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
[tool.black] |
| 71 |
line-length = 100 |
| 72 |
exclude = "venv/" |
| 73 |
include = '\.pyi?$' |
| 74 |
|
| 75 |
|
| 76 |
[tool.mypy] |
| 77 |
show_error_codes = true |
| 78 |
strict_optional = true |
| 79 |
warn_unused_ignores = true |
| 80 |
warn_redundant_casts = true |
| 81 |
warn_return_any = true |
| 82 |
warn_unreachable = true |
| 83 |
disallow_any_generics = true |
| 84 |
check_untyped_defs = true |
| 85 |
implicit_reexport = false |
| 86 |
python_version = "3.11" |
| 87 |
plugins = "pydantic.mypy" |
| 88 |
|
| 89 |
[tool.pydantic-mypy] |
| 90 |
init_forbid_extra = true |
| 91 |
init_typed = false |
| 92 |
warn_required_dynamic_aliases = true |
| 93 |
warn_untyped_fields = true |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
[tool.ruff] |
| 98 |
target-version = "py311" |
| 99 |
line-length = 100 |
| 100 |
output-format = "grouped" |
| 101 |
show-fixes = true |
| 102 |
show-source = true |
| 103 |
task-tags = ["TODO", "FIXME", "XXX", "NOTE", "BUG", "HACK", "CHANGE ME"] |
| 104 |
extend-exclude = [ |
| 105 |
"*venv*/", |
| 106 |
"*.bak.*", |
| 107 |
] |
| 108 |
src = ["src", "tests"] |
| 109 |
|
| 110 |
unfixable = ["ERA001"] |
| 111 |
|
| 112 |
select = [ |
| 113 |
"A", |
| 114 |
"AIR", |
| 115 |
"ANN", |
| 116 |
"ARG", |
| 117 |
"ASYNC", |
| 118 |
"B", |
| 119 |
"BLE", |
| 120 |
"C4", |
| 121 |
"C90", |
| 122 |
|
| 123 |
"D", |
| 124 |
"DJ", |
| 125 |
"DTZ", |
| 126 |
"E", |
| 127 |
"EM", |
| 128 |
"ERA", |
| 129 |
"EXE", |
| 130 |
"F", |
| 131 |
"FA", |
| 132 |
"FBT", |
| 133 |
|
| 134 |
"FLY", |
| 135 |
"G", |
| 136 |
"I", |
| 137 |
"ICN", |
| 138 |
"INP", |
| 139 |
"INT", |
| 140 |
"ISC", |
| 141 |
"N", |
| 142 |
"NPY", |
| 143 |
"PD", |
| 144 |
"PERF", |
| 145 |
"PGH", |
| 146 |
"PIE", |
| 147 |
"PLC", |
| 148 |
"PLE", |
| 149 |
"PLR", |
| 150 |
"PLW", |
| 151 |
"PT", |
| 152 |
"PTH", |
| 153 |
"PYI", |
| 154 |
"Q", |
| 155 |
"RET", |
| 156 |
"RUF", |
| 157 |
"RSE", |
| 158 |
"S", |
| 159 |
"SLF", |
| 160 |
"SLOT", |
| 161 |
"SIM", |
| 162 |
|
| 163 |
"T20", |
| 164 |
"TCH", |
| 165 |
|
| 166 |
"TID", |
| 167 |
"TRY", |
| 168 |
"UP", |
| 169 |
"W", |
| 170 |
"YTT", |
| 171 |
] |
| 172 |
|
| 173 |
ignore = [ |
| 174 |
|
| 175 |
"ANN101", |
| 176 |
"ANN102", |
| 177 |
"E501", |
| 178 |
"PT011", |
| 179 |
] |
| 180 |
|
| 181 |
[tool.ruff.per-file-ignores] |
| 182 |
"**/tests/**" = [ |
| 183 |
"ARG", |
| 184 |
"PLR0913", |
| 185 |
"PLR2004", |
| 186 |
"S101", |
| 187 |
"SLF001", |
| 188 |
] |
| 189 |
"**/tests/**/*_test.py" = [ |
| 190 |
"FBT001", |
| 191 |
] |
| 192 |
"__init__.py" = [ |
| 193 |
"D104", |
| 194 |
"PLC0414", |
| 195 |
] |
| 196 |
"**/testing/examples/**" = [ |
| 197 |
"ERA001", |
| 198 |
] |
| 199 |
"docs/source/conf.py" = [ |
| 200 |
"INP001", |
| 201 |
] |
| 202 |
"__version__.py" = ["ALL"] |
| 203 |
|
| 204 |
[tool.ruff.flake8-annotations] |
| 205 |
suppress-dummy-args = true |
| 206 |
|
| 207 |
[tool.ruff.flake8-builtins] |
| 208 |
builtins-ignorelist = [ |
| 209 |
"id", |
| 210 |
] |
| 211 |
|
| 212 |
[tool.ruff.flake8-import-conventions.extend-aliases] |
| 213 |
"typing" = "t" |
| 214 |
|
| 215 |
[tool.ruff.flake8-pytest-style] |
| 216 |
fixture-parentheses = false |
| 217 |
mark-parentheses = false |
| 218 |
|
| 219 |
[tool.ruff.flake8-type-checking] |
| 220 |
runtime-evaluated-base-classes = [ |
| 221 |
"pydantic.BaseModel", |
| 222 |
] |
| 223 |
|
| 224 |
[tool.ruff.isort] |
| 225 |
combine-as-imports = true |
| 226 |
required-imports = [ |
| 227 |
"from __future__ import annotations", |
| 228 |
] |
| 229 |
|
| 230 |
[tool.ruff.mccabe] |
| 231 |
max-complexity = 20 |
| 232 |
|
| 233 |
[tool.ruff.pep8-naming] |
| 234 |
classmethod-decorators = [ |
| 235 |
"pydantic.field_validator", |
| 236 |
] |
| 237 |
staticmethod-decorators = [] |
| 238 |
|
| 239 |
[tool.ruff.pycodestyle] |
| 240 |
ignore-overlong-task-comments = true |
| 241 |
max-doc-length = 100 |
| 242 |
|
| 243 |
[tool.ruff.pydocstyle] |
| 244 |
convention = "pep257" |
| 245 |
ignore-decorators = [ |
| 246 |
"typing.overload", |
| 247 |
] |
| 248 |
property-decorators = [] |
| 249 |
|
| 250 |
[tool.ruff.pylint] |
| 251 |
max-args = 6 |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
[tool.pytest.ini_options] |
| 256 |
addopts = "-ra --showlocals" |
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
[tool.coverage] |
| 261 |
[tool.coverage.run] |
| 262 |
plugins = ["coverage_conditional_plugin"] |
| 263 |
branch = true |
| 264 |
parallel = true |
| 265 |
context = "static-context" |
| 266 |
omit = [ |
| 267 |
"tests/*", |
| 268 |
] |
| 269 |
|
| 270 |
[tool.coverage.paths] |
| 271 |
tox_combine = [ |
| 272 |
"src/rstcheck_core", |
| 273 |
"*/.tox/*/lib/python*/site-packages/rstcheck_core", |
| 274 |
"*/.tox/pypy*/site-packages/rstcheck_core", |
| 275 |
"*/.tox\\*\\Lib\\site-packages\\rstcheck_core", |
| 276 |
] |
| 277 |
local_combine = [ |
| 278 |
"src/rstcheck_core", |
| 279 |
"*/.venv/lib/python*/site-packages/rstcheck_core", |
| 280 |
"*/.venv\\*\\Lib\\site-packages\\rstcheck_core", |
| 281 |
"*/src/rstcheck_core", |
| 282 |
"*\\src\\rstcheck_core", |
| 283 |
] |
| 284 |
|
| 285 |
[tool.coverage.report] |
| 286 |
show_missing = true |
| 287 |
exclude_lines = [ |
| 288 |
"# pragma: no cover", |
| 289 |
"if __name__ == ['\"]__main__['\"]:", |
| 290 |
"def __str__", |
| 291 |
"def __repr__", |
| 292 |
"if self.debug:", |
| 293 |
"if settings.DEBUG", |
| 294 |
"if 0:", |
| 295 |
"if False:", |
| 296 |
"if TYPE_CHECKING:", |
| 297 |
"if MYPY:", |
| 298 |
] |
| 299 |
|
| 300 |
[tool.coverage.html] |
| 301 |
show_contexts = true |
| 302 |
|
| 303 |
[tool.coverage.coverage_conditional_plugin.rules] |
| 304 |
|
| 305 |
py-gte-310 = "sys_version_info >= (3, 10)" |