1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
|
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools-scm>=8.1.0",
]
[project]
name = "sphinx-substitution-extensions"
description = "Extensions for Sphinx which allow for substitutions."
readme = { file = "README.rst", content-type = "text/x-rst" }
keywords = [
"documentation",
"rst",
"sphinx",
]
license = { file = "LICENSE" }
authors = [
{ name = "Adam Dangoor", email = "adamdangoor@gmail.com" },
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Pytest",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [
"version",
]
dependencies = [
"beartype>=0.18.5",
"docutils>=0.19",
"myst-parser>=4.0.0",
"sphinx>=8.1.0",
]
optional-dependencies.dev = [
"actionlint-py==1.7.7.23",
"check-manifest==0.50",
"deptry==0.23.0",
"doc8==1.1.2",
"doccmd==2025.4.8",
"docformatter==1.7.7",
"interrogate==1.7.0",
"mypy[faster-cache]==1.16.0",
"mypy-strict-kwargs==2025.4.3",
"pre-commit==4.2.0",
"pyenchant==3.3.0rc1",
"pylint==3.3.7",
"pyproject-fmt==2.6.0",
"pyright==1.1.401",
"pyroma==4.2",
"pytest==8.4.0",
"pytest-cov==6.1.1",
"ruff==0.11.13",
# We add shellcheck-py not only for shell scripts and shell code blocks,
# but also because having it installed means that ``actionlint-py`` will
# use it to lint shell commands in GitHub workflow files.
"shellcheck-py==0.10.0.1",
"shfmt-py==3.11.0.2",
"sphinx-lint==1.0.0",
"sphinx-toolbox==4.0.0",
"types-docutils==0.21.0.20250604",
"vulture==2.14",
"yamlfix==1.17.0",
]
optional-dependencies.release = [ "check-wheel-contents==0.6.2" ]
urls.Source = "https://github.com/adamtheturtle/sphinx-substitution-extensions"
[tool.setuptools]
zip-safe = false
[tool.setuptools.packages.find]
where = [
"src",
]
[tool.setuptools.package-data]
sphinx_substitution_extensions = [
"py.typed",
]
[tool.distutils.bdist_wheel]
universal = true
[tool.setuptools_scm]
# This keeps the start of the version the same as the last release.
# This is useful for our documentation to include e.g. binary links
# to the latest released binary.
#
# Code to match this is in ``conf.py``.
version_scheme = "post-release"
[tool.ruff]
line-length = 79
lint.select = [
"ALL",
]
lint.ignore = [
# Ruff warns that this conflicts with the formatter.
"COM812",
# Allow our chosen docstring line-style - no one-line summary.
"D200",
"D205",
"D212",
"D415",
# Ruff warns that this conflicts with the formatter.
"ISC001",
# Ignore "too-many-*" errors as they seem to get in the way more than
# helping.
"PLR0913",
# Allow 'assert' as we use it for tests.
"S101",
]
# Do not automatically remove commented out code.
# We comment out code during development, and with VSCode auto-save, this code
# is sometimes annoyingly removed.
lint.unfixable = [
"ERA001",
]
lint.pydocstyle.convention = "google"
[tool.pylint]
[tool.pylint.'MASTER']
# Pickle collected data for later comparisons.
persistent = true
# Use multiple processes to speed up Pylint.
jobs = 0
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
# See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html.
# We do not use the plugins:
# - pylint.extensions.code_style
# - pylint.extensions.magic_value
# - pylint.extensions.while_used
# as they seemed to get in the way.
load-plugins = [
'pylint.extensions.bad_builtin',
'pylint.extensions.comparison_placement',
'pylint.extensions.consider_refactoring_into_while_condition',
'pylint.extensions.docparams',
'pylint.extensions.dunder',
'pylint.extensions.eq_without_hash',
'pylint.extensions.for_any_all',
'pylint.extensions.mccabe',
'pylint.extensions.no_self_use',
'pylint.extensions.overlapping_exceptions',
'pylint.extensions.private_import',
'pylint.extensions.redefined_loop_name',
'pylint.extensions.redefined_variable_type',
'pylint.extensions.set_membership',
'pylint.extensions.typing',
]
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension = false
[tool.pylint.'MESSAGES CONTROL']
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable = [
'bad-inline-option',
'deprecated-pragma',
'file-ignored',
'spelling',
'use-symbolic-message-instead',
'useless-suppression',
]
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable = [
'too-few-public-methods',
'too-many-positional-arguments',
'too-many-locals',
'too-many-arguments',
'too-many-instance-attributes',
'too-many-return-statements',
'too-many-lines',
'locally-disabled',
# Let flake8 handle long lines
'line-too-long',
# Let ruff handle unused imports
'unused-import',
# Let ruff deal with sorting
'ungrouped-imports',
# We don't need everything to be documented because of mypy
'missing-type-doc',
'missing-return-type-doc',
# Too difficult to please
'duplicate-code',
# Let ruff handle imports
'wrong-import-order',
# Let ruff find protected member access.
'protected-access',
]
[tool.pylint.'FORMAT']
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt = false
[tool.pylint.'SPELLING']
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict = 'en_US'
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file = 'spelling_private_dict.txt'
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words = 'no'
[tool.docformatter]
make-summary-multi-line = true
[tool.check-manifest]
ignore = [
".checkmake-config.ini",
".yamlfmt",
"*.enc",
".pre-commit-config.yaml",
"readthedocs.yaml",
"CHANGELOG.rst",
"CODE_OF_CONDUCT.rst",
"CONTRIBUTING.rst",
"LICENSE",
"Makefile",
"ci",
"ci/**",
"codecov.yaml",
"docs",
"docs/**",
".git_archival.txt",
"sample",
"sample/**",
"spelling_private_dict.txt",
"tests",
"tests-pylintrc",
"tests/**",
"lint.mk",
]
[tool.deptry]
pep621_dev_dependency_groups = [
"dev",
"release",
]
[tool.pyproject-fmt]
indent = 4
keep_full_version = true
max_supported_python = "3.13"
[tool.pytest.ini_options]
xfail_strict = true
log_cli = true
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
[tool.mypy]
strict = true
files = [ "." ]
exclude = [ "build" ]
follow_untyped_imports = true
plugins = [
"mypy_strict_kwargs",
]
[tool.pyright]
enableTypeIgnoreComments = false
reportUnnecessaryTypeIgnoreComment = true
typeCheckingMode = "strict"
[tool.interrogate]
fail-under = 100
omit-covered-files = true
verbose = 2
[tool.doc8]
max_line_length = 2000
ignore_path = [
"./.eggs",
"./docs/build",
"./docs/build/spelling/output.txt",
"./node_modules",
"./sample/build",
"./src/*.egg-info/",
"./src/*/_setuptools_scm_version.txt",
]
[tool.vulture]
# Ideally we would limit the paths to the source code where we want to ignore names,
# but Vulture does not enable this.
ignore_names = [
# pytest configuration
"pytest_collect_file",
"pytest_collection_modifyitems",
"pytest_plugins",
# pytest fixtures - we name fixtures like this for this purpose
"fixture_*",
# Sphinx
"autoclass_content",
"autoclass_content",
"autodoc_member_order",
"copybutton_exclude",
"extensions",
"html_show_copyright",
"html_show_sourcelink",
"html_show_sphinx",
"html_theme",
"html_theme_options",
"html_title",
"htmlhelp_basename",
"intersphinx_mapping",
"language",
"linkcheck_ignore",
"linkcheck_retries",
"master_doc",
"myst_enable_extensions",
"myst_substitutions",
"nitpicky",
"project_copyright",
"pygments_style",
"rst_prolog",
"setup",
"source_suffix",
"spelling_word_list_filename",
"templates_path",
"warning_is_error",
]
# Duplicate some of .gitignore
exclude = [ ".venv" ]
[tool.yamlfix]
section_whitelines = 1
whitelines = 1
|