Skip to content

Commit 5f8ec55

Browse files
authored
Merge pull request #1767 from ncoghlan/disable-pypi-link-anchor-checks
Ignore PyPI anchors when checking links
2 parents 13308d5 + 085b29c commit 5f8ec55

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/conf.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@
141141
"https://anaconda.org",
142142
]
143143
linkcheck_retries = 5
144-
# Ignore anchors for links to GitHub project pages -- GitHub adds anchors from
145-
# README.md headings through JavaScript, so Sphinx's linkcheck can't find them
146-
# in the HTML.
144+
# Ignore anchors for common targets when we know they likely won't be found
147145
linkcheck_anchors_ignore_for_url = [
146+
# GitHub synthesises anchors in JavaScript, so Sphinx can't find them in the HTML
148147
r"https://github\.com/",
148+
# While PyPI has its botscraping defenses active, Sphinx can't resolve the anchors
149+
# https://github.com/pypa/packaging.python.org/issues/1744
150+
r"https://pypi\.org/",
149151
]
150152

151153
# -- Options for extlinks ----------------------------------------------------------

0 commit comments

Comments
 (0)