File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,28 @@ check-docs-links: _link_check
153
153
check-docs :
154
154
@ just run doc8 --ignore-path ./ doc/ build --max-line-length 100 -q ./ doc
155
155
156
+ # fetch the intersphinx references for the given package
157
+ [script ]
158
+ fetch-refs LIB : install-docs
159
+ import os
160
+ from pathlib import Path
161
+ import logging as _logging
162
+ import sys
163
+ import runpy
164
+ from sphinx.ext.intersphinx import inspect_main
165
+ _logging.basicConfig()
166
+
167
+ libs = runpy.run_path(Path(os .getcwd()) / " doc/source/conf.py" ).get(" intersphinx_mapping" )
168
+ url = libs.get(" {{ LIB }} " , None)
169
+ if not url:
170
+ sys.exit(f" Unrecognized {{ LIB }} , must be one of: {', '.join(libs.keys())}" )
171
+ if url[1 ] is None:
172
+ url = f" {url[0].rstrip('/')}/objects.inv"
173
+ else :
174
+ url = url[1 ]
175
+
176
+ raise SystemExit(inspect_main([url]))
177
+
156
178
# lint the code
157
179
check-lint :
158
180
@ just run ruff check --select I
You can’t perform that action at this time.
0 commit comments