|
68 | 68 | # Minimum version of sphinx required
|
69 | 69 | needs_sphinx = '3.2'
|
70 | 70 |
|
| 71 | +# Ignore any .rst files in the includes/ directory; |
| 72 | +# they're embedded in pages but not rendered individually. |
71 | 73 | # Ignore any .rst files in the venv/ directory.
|
72 |
| -exclude_patterns = ['venv/*', 'README.rst'] |
| 74 | +exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst'] |
73 | 75 | venvdir = os.getenv('VENVDIR')
|
74 | 76 | if venvdir is not None:
|
75 | 77 | exclude_patterns.append(venvdir + '/*')
|
76 | 78 |
|
| 79 | +nitpick_ignore = [ |
| 80 | + # Do not error nit-picky mode builds when _SubParsersAction.add_parser cannot |
| 81 | + # be resolved, as the method is currently undocumented. For context, see |
| 82 | + # https://github.com/python/cpython/pull/103289. |
| 83 | + ('py:meth', '_SubParsersAction.add_parser'), |
| 84 | +] |
| 85 | + |
77 | 86 | # Disable Docutils smartquotes for several translations
|
78 | 87 | smartquotes_excludes = {
|
79 | 88 | 'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
|
|
252 | 261 | # Options for the link checker
|
253 | 262 | # ----------------------------
|
254 | 263 |
|
255 |
| -# Ignore certain URLs. |
256 |
| -linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+'] |
| 264 | +linkcheck_allowed_redirects = { |
| 265 | + # bpo-NNNN -> BPO -> GH Issues |
| 266 | + r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': 'https://github.com/python/cpython/issues/\d+', |
| 267 | + # GH-NNNN used to refer to pull requests |
| 268 | + r'https://github.com/python/cpython/issues/\d+': 'https://github.com/python/cpython/pull/\d+', |
| 269 | + # :source:`something` linking files in the repository |
| 270 | + r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*' |
| 271 | +} |
| 272 | + |
| 273 | +linkcheck_anchors_ignore = [ |
| 274 | + # ignore anchors that start with a '/', e.g. Wikipedia media files: |
| 275 | + # https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg |
| 276 | + r'\/.*', |
| 277 | +] |
| 278 | + |
| 279 | +linkcheck_ignore = [ |
| 280 | + # The crawler gets "Anchor not found" |
| 281 | + r'https://developer.apple.com/documentation/.+?#.*', |
| 282 | + r'https://devguide.python.org.+?/#.*', |
| 283 | + r'https://github.com.+?#.*', |
| 284 | + # Robot crawlers not allowed: "403 Client Error: Forbidden" |
| 285 | + r'https://support.enthought.com/hc/.*', |
| 286 | + # SSLError CertificateError, even though it is valid |
| 287 | + r'https://unix.org/version2/whatsnew/lp64_wp.html', |
| 288 | +] |
257 | 289 |
|
258 | 290 |
|
259 | 291 | # Options for extensions
|
|
0 commit comments