Skip to content

Commit b5f5083

Browse files
authored
Merge pull request #24633 from meeseeksmachine/auto-backport-of-pr-24592-on-v3.6.x
Backport PR #24592 on branch v3.6.x (DOC: Don't try to link paths that are on a different drive)
2 parents bf2f8ee + f51a504 commit b5f5083

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
@@ -662,7 +662,10 @@ def linkcode_resolve(domain, info):
662662
if lineno else "")
663663

664664
startdir = Path(matplotlib.__file__).parent.parent
665-
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
665+
try:
666+
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
667+
except ValueError:
668+
return None
666669

667670
if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
668671
return None

0 commit comments

Comments
 (0)