Skip to content

Commit f39e00f

Browse files
rffontenellehugovk
andauthored
GH-103484: Docs: add linkcheck allowed redirects entries for most cases (#103569)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent e35e0f1 commit f39e00f

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
@@ -254,9 +254,14 @@
254254
# Options for the link checker
255255
# ----------------------------
256256

257-
# Ignore certain URLs.
258-
linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+']
259-
257+
linkcheck_allowed_redirects = {
258+
# bpo-NNNN -> BPO -> GH Issues
259+
r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': 'https://github.com/python/cpython/issues/\d+',
260+
# GH-NNNN used to refer to pull requests
261+
r'https://github.com/python/cpython/issues/\d+': 'https://github.com/python/cpython/pull/\d+',
262+
# :source:`something` linking files in the repository
263+
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
264+
}
260265

261266
# Options for extensions
262267
# ----------------------

0 commit comments

Comments
 (0)