Skip to content

Commit 1dad3d1

Browse files
miss-islingtonrffontenellehugovk
authored
GH-103484: Docs: add linkcheck allowed redirects entries for most cases (GH-103569)
(cherry picked from commit f39e00f) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
1 parent 4c4ef50 commit 1dad3d1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Doc/conf.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,14 @@
242242
# Options for the link checker
243243
# ----------------------------
244244

245-
# Ignore certain URLs.
246-
linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+']
247-
245+
linkcheck_allowed_redirects = {
246+
# bpo-NNNN -> BPO -> GH Issues
247+
r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': 'https://github.com/python/cpython/issues/\d+',
248+
# GH-NNNN used to refer to pull requests
249+
r'https://github.com/python/cpython/issues/\d+': 'https://github.com/python/cpython/pull/\d+',
250+
# :source:`something` linking files in the repository
251+
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
252+
}
248253

249254
# Options for extensions
250255
# ----------------------

0 commit comments

Comments
 (0)