Skip to content

Commit 2d10e9c

Browse files
vkk800Pingviinituutti
authored andcommitted
DOC: Fix creation of [source] links in the doc creation (pandas-dev#23129)
1 parent 416f842 commit 2d10e9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/source/conf.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,11 @@ def linkcode_resolve(domain, info):
569569
return None
570570

571571
try:
572-
fn = inspect.getsourcefile(obj)
572+
# inspect.unwrap() was added in Python version 3.4
573+
if sys.version_info >= (3, 5):
574+
fn = inspect.getsourcefile(inspect.unwrap(obj))
575+
else:
576+
fn = inspect.getsourcefile(obj)
573577
except:
574578
fn = None
575579
if not fn:

0 commit comments

Comments
 (0)