Skip to content

Commit a52bc4c

Browse files
committed
Fix sphinx linkcheck
PyPI started using <section id=""> anchor links that are not understood by linkcheck. Ignore these URLs in the check until they are supported.
1 parent eb128f7 commit a52bc4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@
278278
# Avoid errors from 403/Login Redirects
279279
r"https://(test\.)?pypi\.org/manage/project/twine/collaboration/?",
280280
r"https://pypi\.org/manage/project/twine/collaboration/?",
281+
# PyPI uses <section id=""> anchor links that are not understood by
282+
# linkcheck. Ignore these link targets in the check until they are
283+
# supported. Maybe use linkcheck_anchors_ignore_for_url configuration
284+
# option once Sphinx 7.1 or later is used, see
285+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_anchors_ignore_for_url
286+
r"https://pypi\.org/project/[^/]+/\#",
281287
]
282288

283289
intersphinx_mapping = {

0 commit comments

Comments
 (0)