| 1 | Subject: Generate correct URL to source code under decorator |
| 2 | |
| 3 | Origin: vendor |
| 4 | Forwarded: https://github.com/selectel/pyxs/pull/17 |
| 5 | From: Benjamin Hof <[email protected]> |
| 6 | Last-Update: 2020-08-06 |
| 7 | Applied-Upstream: no |
| 8 | |
| 9 | --- |
| 10 | docs/conf.py | 1 + |
| 11 | 1 file changed, 1 insertion(+) |
| 12 | |
| 13 | diff --git a/docs/conf.py b/docs/conf.py |
| 14 | index a7a0d2a..d378605 100644 |
| 15 | --- a/docs/conf.py |
| 16 | +++ b/docs/conf.py |
| 17 | @@ -117,6 +117,7 @@ def linkcode_resolve(domain, info): |
| 18 | import inspect |
| 19 | import os |
| 20 | import pyxs |
| 21 | + obj = inspect.unwrap(obj) |
| 22 | fn = inspect.getsourcefile(obj) |
| 23 | fn = os.path.relpath(fn, os.path.dirname(pyxs.__file__)) |
| 24 | source, lineno = inspect.getsourcelines(obj) |