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
When a method or function has overloads, the signature(s) in the docstrings are ignored.
The behavior is already correct for classes (__init__), but not for methods and functions.
See screenshot below for a visual description.
Context: we use overloads for correct type hints, but we use the docstrings to create human-readable documentation.
How to Reproduce
This is a minimal repo created for several Sphinx bug reports.
RTD-theme and napoleon are enabled, but it is also reproducable without them.
$ git clone https://github.com/pybricks/sphinx-issues-minimal
$ cd sphinx-issues-minimal
# Optional if you don't have Sphinx dev version and RTD theme 1.0.0 already:
# poetry install
$ make clean html
$ # Open build/html/bugs.html to see above output
$ # See src/bugs/__init__.py for the offending Python source code
Expected behavior
The behavior in the __init__ is correct. Expect the same in methods.
Context: we use overloads for correct type hints, but we use the docstrings to create human-readable documentation.
Describe the bug
When a method or function has overloads, the signature(s) in the docstrings are ignored.
The behavior is already correct for classes (
__init__
), but not for methods and functions.See screenshot below for a visual description.
Context: we use overloads for correct type hints, but we use the docstrings to create human-readable documentation.
How to Reproduce
This is a minimal repo created for several Sphinx bug reports.
RTD-theme and napoleon are enabled, but it is also reproducable without them.
Expected behavior
The behavior in the
__init__
is correct. Expect the same in methods.Context: we use overloads for correct type hints, but we use the docstrings to create human-readable documentation.
Your project
https://github.com/pybricks/sphinx-issues-minimal
Screenshots
OS
Ubuntu
Python version
3.8.3
Sphinx version
5.0 / 5.1.0b1 / 1222bed
Sphinx extensions
'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx_rtd_theme'
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: