Skip to content

Commit

Permalink
Backport PR matplotlib#24592: DOC: Don't try to link paths that are o…
Browse files Browse the repository at this point in the history
…n a different drive
  • Loading branch information
ksunden authored and meeseeksmachine committed Dec 5, 2022
1 parent bf2f8ee commit f51a504
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/conf.py
Expand Up @@ -662,7 +662,10 @@ def linkcode_resolve(domain, info):
if lineno else "")

startdir = Path(matplotlib.__file__).parent.parent
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
try:
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
except ValueError:
return None

if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
return None
Expand Down

0 comments on commit f51a504

Please sign in to comment.