You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the typing annotations are all shown as ~typing.Any and no hyperlinks are generated. The issue seems to be with the np.int32 default argument. As far as I've been able to debug it, it goes through the following steps
a string is generated for the signature that contains repr(np.int32).
Describe the bug
When rendering the following snippet
the typing annotations are all shown as
~typing.Any
and no hyperlinks are generated. The issue seems to be with thenp.int32
default argument. As far as I've been able to debug it, it goes through the following stepsrepr(np.int32)
.signature_from_str
insphinx/sphinx/util/inspect.py
Line 700 in 2f60b44
ast.parse
throws aSyntaxError
due to the<class 'numpy.int32'>
.handle_signature
proceeds to skip the parsing atsphinx/sphinx/domains/python.py
Line 517 in 2f60b44
Ideally the type annotations would be rendered and hyperlinked correctly.
How to Reproduce
sphinx-bug-mre.tar.gz contains a minimal example that can be built with the usual
On my machine, this results in the rendering below.
v0
is rendered as expected, whilev1
has all the types as plaintext.Environment Information
Sphinx extensions
sphinx.ext.autodoc; sphinx.ext.intersphinx
Additional context
No response
The text was updated successfully, but these errors were encountered: