|
| 1 | +from __future__ import annotations |
| 2 | + |
1 | 3 | extensions = [
|
2 | 4 | 'sphinx.ext.autodoc',
|
3 | 5 | 'jaraco.packaging.sphinx',
|
|
93 | 95 |
|
94 | 96 | # Be strict about any broken references
|
95 | 97 | nitpicky = True
|
| 98 | +nitpick_ignore: list[tuple[str, str]] = [] |
96 | 99 |
|
97 | 100 | # Include Python intersphinx mapping to prevent failures
|
98 | 101 | # jaraco/skeleton#51
|
|
104 | 107 | # Preserve authored syntax for defaults
|
105 | 108 | autodoc_preserve_defaults = True
|
106 | 109 |
|
107 |
| -intersphinx_mapping.update({ |
108 |
| - 'pip': ('https://pip.pypa.io/en/latest', None), |
109 |
| - 'build': ('https://build.pypa.io/en/latest', None), |
110 |
| - 'PyPUG': ('https://packaging.python.org/en/latest/', None), |
111 |
| - 'packaging': ('https://packaging.pypa.io/en/latest/', None), |
112 |
| - 'twine': ('https://twine.readthedocs.io/en/stable/', None), |
113 |
| - 'importlib-resources': ( |
114 |
| - 'https://importlib-resources.readthedocs.io/en/latest', |
115 |
| - None, |
116 |
| - ), |
117 |
| -}) |
118 |
| - |
119 |
| -# Add support for linking usernames |
120 |
| -github_url = 'https://github.com' |
121 |
| -github_repo_org = 'pypa' |
122 |
| -github_repo_name = 'setuptools' |
123 |
| -github_repo_slug = f'{github_repo_org}/{github_repo_name}' |
124 |
| -github_repo_url = f'{github_url}/{github_repo_slug}' |
125 |
| -github_sponsors_url = f'{github_url}/sponsors' |
| 110 | +# Add support for linking usernames, PyPI projects, Wikipedia pages |
| 111 | +github_url = 'https://github.com/' |
126 | 112 | extlinks = {
|
127 |
| - 'user': (f'{github_sponsors_url}/%s', '@%s'), |
| 113 | + 'user': (f'{github_url}%s', '@%s'), |
128 | 114 | 'pypi': ('https://pypi.org/project/%s', '%s'),
|
129 | 115 | 'wiki': ('https://wikipedia.org/wiki/%s', '%s'),
|
130 | 116 | }
|
131 | 117 | extensions += ['sphinx.ext.extlinks']
|
132 | 118 |
|
| 119 | +# local |
| 120 | + |
133 | 121 | # Ref: https://github.com/python-attrs/attrs/pull/571/files\
|
134 | 122 | # #diff-85987f48f1258d9ee486e3191495582dR82
|
135 | 123 | default_role = 'any'
|
|
163 | 151 | # Support for distutils
|
164 | 152 |
|
165 | 153 | # Ref: https://stackoverflow.com/a/30624034/595220
|
166 |
| -nitpick_ignore = [ |
| 154 | +nitpick_ignore += [ |
167 | 155 | ('c:func', 'SHGetSpecialFolderPath'), # ref to MS docs
|
168 | 156 | ('envvar', 'DIST_EXTRA_CONFIG'), # undocumented
|
169 | 157 | ('envvar', 'DISTUTILS_DEBUG'), # undocumented
|
|
245 | 233 | },
|
246 | 234 | # rel="apple-touch-icon" does not support SVG yet
|
247 | 235 | ]
|
| 236 | + |
| 237 | +intersphinx_mapping.update({ |
| 238 | + 'pip': ('https://pip.pypa.io/en/latest', None), |
| 239 | + 'build': ('https://build.pypa.io/en/latest', None), |
| 240 | + 'PyPUG': ('https://packaging.python.org/en/latest/', None), |
| 241 | + 'packaging': ('https://packaging.pypa.io/en/latest/', None), |
| 242 | + 'twine': ('https://twine.readthedocs.io/en/stable/', None), |
| 243 | + 'importlib-resources': ( |
| 244 | + 'https://importlib-resources.readthedocs.io/en/latest', |
| 245 | + None, |
| 246 | + ), |
| 247 | +}) |
0 commit comments