Skip to content

Commit 0c6550d

Browse files
committed
Show version in error tracebacks
1 parent 9b3a613 commit 0c6550d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sphinx_autodoc_typehints/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def sphinx_autodoc_typehints_type_role(
10111011
return [n], []
10121012

10131013

1014-
def setup(app: Sphinx) -> dict[str, bool]:
1014+
def setup(app: Sphinx) -> dict[str, bool | str]:
10151015
app.add_config_value("always_document_param_types", False, "html") # noqa: FBT003
10161016
app.add_config_value("typehints_fully_qualified", False, "env") # noqa: FBT003
10171017
app.add_config_value("typehints_document_rtype", True, "env") # noqa: FBT003
@@ -1029,7 +1029,11 @@ def setup(app: Sphinx) -> dict[str, bool]:
10291029
app.connect("autodoc-process-signature", process_signature)
10301030
app.connect("autodoc-process-docstring", process_docstring)
10311031
install_patches(app)
1032-
return {"parallel_read_safe": True, "parallel_write_safe": True}
1032+
return {
1033+
"version": __version__,
1034+
"parallel_read_safe": True,
1035+
"parallel_write_safe": True,
1036+
}
10331037

10341038

10351039
__all__ = [

0 commit comments

Comments
 (0)