Skip to content

Commit 68832ff

Browse files
authored
Merge pull request #24592 from QuLogic/fix-doc-linkage
DOC: Don't try to link paths that are on a different drive
2 parents a170539 + 8187382 commit 68832ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/conf.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,10 @@ def linkcode_resolve(domain, info):
682682
if lineno else "")
683683

684684
startdir = Path(matplotlib.__file__).parent.parent
685-
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
685+
try:
686+
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
687+
except ValueError:
688+
return None
686689

687690
if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
688691
return None

0 commit comments

Comments
 (0)