📝 Replace GH/PyPI `extlinks` w/ `sphinx_issues`
This extension implements more generic roles that can also be used more flexibly. Relying on an external extension allows to stop maintaining an in-repo copy of the commonly used behavior.
This commit is contained in:
parent
66dbab697b
commit
b919a711a4
|
@ -89,6 +89,7 @@ extensions = [
|
||||||
"sphinx_removed_in",
|
"sphinx_removed_in",
|
||||||
"sphinxcontrib_trio",
|
"sphinxcontrib_trio",
|
||||||
"sphinxcontrib.towncrier.ext", # provides `towncrier-draft-entries` directive
|
"sphinxcontrib.towncrier.ext", # provides `towncrier-draft-entries` directive
|
||||||
|
"sphinx_issues", # implements `:issue:`, `:pr:` and other GH-related roles
|
||||||
]
|
]
|
||||||
|
|
||||||
# Building PDF docs on readthedocs requires inkscape for svg to pdf
|
# Building PDF docs on readthedocs requires inkscape for svg to pdf
|
||||||
|
@ -170,13 +171,8 @@ linkcheck_ignore = [
|
||||||
linkcheck_workers = 5
|
linkcheck_workers = 5
|
||||||
|
|
||||||
|
|
||||||
_repo = "https://github.com/pytest-dev/pytest"
|
|
||||||
extlinks = {
|
extlinks = {
|
||||||
"bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
|
"bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
|
||||||
"pypi": ("https://pypi.org/project/%s/", "%s"),
|
|
||||||
"issue": (f"{_repo}/issues/%s", "issue #%s"),
|
|
||||||
"pr": (f"{_repo}/pull/%s", "pull request #%s"),
|
|
||||||
"user": ("https://github.com/%s", "@%s"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -451,6 +447,13 @@ towncrier_draft_working_directory = PROJECT_ROOT_DIR
|
||||||
towncrier_draft_config_path = "pyproject.toml" # relative to cwd
|
towncrier_draft_config_path = "pyproject.toml" # relative to cwd
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for sphinx_issues extension -----------------------------------
|
||||||
|
|
||||||
|
issues_github_path = "pytest-dev/pytest"
|
||||||
|
issues_prefix = "issue #"
|
||||||
|
issues_pr_prefix = "pull request #"
|
||||||
|
|
||||||
|
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
"pluggy": ("https://pluggy.readthedocs.io/en/stable", None),
|
"pluggy": ("https://pluggy.readthedocs.io/en/stable", None),
|
||||||
"python": ("https://docs.python.org/3", None),
|
"python": ("https://docs.python.org/3", None),
|
||||||
|
|
|
@ -10,3 +10,4 @@ sphinxcontrib-svg2pdfconverter
|
||||||
packaging
|
packaging
|
||||||
furo
|
furo
|
||||||
sphinxcontrib-towncrier
|
sphinxcontrib-towncrier
|
||||||
|
sphinx-issues
|
||||||
|
|
Loading…
Reference in New Issue