Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8187382

Browse filesBrowse files
committed
DOC: Don't try to link paths that are on a different drive
This may happen if Python is installed on C: and Matplotlib is installed on some other drive. As the point of this extension is to create GitHub links for Matplotlib *only*, we should ignore all paths that cannot be relativized to it. Fixes #24574
1 parent a1cc739 commit 8187382
Copy full SHA for 8187382

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+4-1Lines changed: 4 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.