Skip to content

Commit fedc315

Browse files
committed
docs(conf): Typings for mypy
1 parent b8395d8 commit fedc315

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
if t.TYPE_CHECKING:
1212
from sphinx.application import Sphinx
1313

14-
1514
# Get the project root dir, which is the parent dir of this
1615
cwd = pathlib.Path(__file__).parent
1716
project_root = cwd.parent
@@ -177,7 +176,7 @@
177176
aafig_default_options = {"scale": 0.75, "aspect": 0.5, "proportional": True}
178177

179178

180-
def linkcode_resolve(domain, info):
179+
def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]:
181180
"""
182181
Determine the URL corresponding to Python object
183182
@@ -210,7 +209,8 @@ def linkcode_resolve(domain, info):
210209
except AttributeError:
211210
pass
212211
else:
213-
obj = unwrap(obj)
212+
if callable(obj):
213+
obj = unwrap(obj)
214214

215215
try:
216216
fn = inspect.getsourcefile(obj)

0 commit comments

Comments
 (0)