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
Is your feature request related to a problem? Please describe.
It would be nice to show empty parentheses () for overloaded classes, such that all signatures look consistent. Right now (Sphinx 4.4.0), they look different:
Describe the solution you'd like
Show empty parentheses for overloaded class signatures:
laurensvalk
changed the title
Don't omit empty parentheses for overloaded class signatures
Don't omit empty parentheses for hardcoded class docstrings
Apr 2, 2022
If we take the specific case where docstrings are manually overridden, then this could perhaps be considered as a bug.
Take this example:
classMyComplex:
def__init__(self, *args):
"""MyComplex() MyComplex(string: str) MyComplex(a: Union[float, complex], b: Union[float, complex] = 0) The () are omitted on first case even though they are entered explicitly. """
This gets rendered as:
Workaround (and possible minor fix without too many breaking changes).
It does render it if you add a zero-size whitespace character.
This gives:
It looks like every other character gets rendered too except a normal space.
So perhaps this could be make to work by allowing a normal space here.
Is your feature request related to a problem? Please describe.
It would be nice to show empty parentheses () for overloaded classes, such that all signatures look consistent. Right now (Sphinx 4.4.0), they look different:
Describe the solution you'd like
Show empty parentheses for overloaded class signatures:
Additional context
Originally reported here: pybricks/pybricks-api#85
Related issue:
#10280
The text was updated successfully, but these errors were encountered: