diff options
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r-- | doc/source/conf.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 1472f5155..455e9748b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -104,8 +104,8 @@ if 'scipyorg' in tags: "edit_link": True, "sidebar": "right", "scipy_org_logo": True, - "rootlinks": [("http://scipy.org/", "Scipy.org"), - ("http://docs.scipy.org/", "Docs")] + "rootlinks": [("https://scipy.org/", "Scipy.org"), + ("https://docs.scipy.org/", "Docs")] } else: # Default build @@ -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: @@ -341,8 +350,8 @@ def linkcode_resolve(domain, info): fn = relpath(fn, start=dirname(numpy.__file__)) if 'dev' in numpy.__version__: - return "http://github.com/numpy/numpy/blob/master/numpy/%s%s" % ( + return "https://github.com/numpy/numpy/blob/master/numpy/%s%s" % ( fn, linespec) else: - return "http://github.com/numpy/numpy/blob/v%s/numpy/%s%s" % ( + return "https://github.com/numpy/numpy/blob/v%s/numpy/%s%s" % ( numpy.__version__, fn, linespec) |