We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When documenting a Python module like this (using the sphinx.ext.autodoc extension):
sphinx.ext.autodoc
.. automodule:: mymodule :members: :undoc-members:
... and mymodule.py has a class with a __slots__ attribute that consists of a single string like this:
mymodule.py
__slots__
class MyClassWithSlots: __slots__ = 'abc'
... the generated class documentation contains each of the characters in addition to the whole string:
Please note that the Python docs explicitly allow a single string (and not only iterables):
This class variable can be assigned a string, iterable, or sequence of strings with variable names used by instances.
When using a tuple or a list of string, everything is fine:
Expected behavior
Environment info
3.x
master
The text was updated successfully, but these errors were encountered:
autodoc: check whether __slots__ is a str
da4f091
Closes sphinx-doc#8294.
Successfully merging a pull request may close this issue.
When documenting a Python module like this (using the
sphinx.ext.autodoc
extension):... and
mymodule.py
has a class with a__slots__
attribute that consists of a single string like this:... the generated class documentation contains each of the characters in addition to the whole string:
Please note that the Python docs explicitly allow a single string (and not only iterables):
When using a tuple or a list of string, everything is fine:
Expected behavior
Environment info
3.x
andmaster
branchThe text was updated successfully, but these errors were encountered: