Skip to content

Commit 54f2837

Browse files
committed
Fix missing __text_signature__ in docassert
1 parent 3b29353 commit 54f2837

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sphinx_runpython/docassert/sphinx_docassert_extension.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ def check_item(fieldarg, content, logger):
131131
obj = import_any_object(idocname)
132132
else:
133133
obj = import_object(idocname, kind=kind)
134-
tsig = getattr(obj[0], "__text_signature__")
134+
try:
135+
tsig = getattr(obj[0], "__text_signature__")
136+
except AttributeError:
137+
tsig = "?"
135138
if tsig != "($self, /, *args, **kwargs)":
136139
logger.warning(
137140
"[docassert] %r has no parameter %r (in %r) [sig=%r]%s.",

0 commit comments

Comments
 (0)