Skip to content

Commit aa460c5

Browse files
rffontenellehugovk
authored andcommitted
pythonGH-103484: Docs: add linkcheck allowed redirects entries for most cases (pythonGH-103569)
(cherry picked from commit f39e00f) Co-authored-by: Rafael Fontenelle <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 4c4ef50 commit aa460c5

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)