New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sphinx not respecting __signature__ #7613
Comments
Note: ndindex provides |
I use a class property so that help() shows the signature on the class, not just on instances. Looking at the |
This ought to be fairly straightforward to add another special-case for. The problem is that Sphinx cannot use In this case, that implementation is missing the code path for a |
Fix #7613: autodoc: autodoc does not respect __signature__ of the class
I am having an issue with Sphinx 3.0.3 where classes that define
__signature__
are being shown with*args
(the naive signature from__init__
). This is the project https://github.com/Quansight/ndindex/tree/master/docs.See for example https://quansight.github.io/ndindex/api.html#slice. The signature on the class in the docs says "Slice(*args)". But if you call inspect.signature, you get
You can see
__signature__
defined on the superclass here.This was supposedly fixed in #2828, so either there was a regression, or else somehow the code doesn't handle what I am doing properly
The text was updated successfully, but these errors were encountered: