From eec21cba62659baed8e81108dc8fdc1bddc7d2ab Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 4 Jun 2023 12:53:48 -0500 Subject: [PATCH] !squash --- docs/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b4c77499..89f9045c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -171,7 +171,9 @@ } -def linkcode_resolve(domain, info): # NOQA: C901 +def linkcode_resolve( + domain: str, info: dict[str, str] +) -> t.Union[None, str]: # NOQA: C901 """ Determine the URL corresponding to Python object @@ -204,7 +206,8 @@ def linkcode_resolve(domain, info): # NOQA: C901 except AttributeError: pass else: - obj = unwrap(obj) + if callable(obj): + obj = unwrap(obj) try: fn = inspect.getsourcefile(obj)