summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 93a5ea01e..455e9748b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -321,6 +321,15 @@ def linkcode_resolve(domain, info):
except Exception:
return None
+ # strip decorators, which would resolve to the source of the decorator
+ # possibly an upstream bug in getsourcefile, bpo-1764286
+ try:
+ unwrap = inspect.unwrap
+ except AttributeError:
+ pass
+ else:
+ obj = unwrap(obj)
+
try:
fn = inspect.getsourcefile(obj)
except Exception: