Ian Pilcher
unread,Feb 6, 2023, 12:44:44 PM2/6/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sphinx...@googlegroups.com
Consider the module below.
sphinxtest.py:
"""A module to test Sphinx.
.. autoclass:: _Foo
:members:
:private-members:
"""
import enum
class _Foo(object):
"""A class to test Sphinx.
:param name: The name of the Foo.
:type name: str
"""
def __init__(self, name):
self.__name = name
# Name will be mangled to _Foo__Bar
class __Bar(enum.Enum):
"""A private inner class."""
BAZ = 1
"""Bar gonna baz."""
How can I get the __Bar inner class (whose name will be mangled to
_Foo__Bar) to be automatically documented? (I.e. the docstrings of both
the inner class and its member should be included in the generated
documentation.)
Currently, the generated documentation only includes this.
_Foo__Bar
alias of sphinxtest._Foo.__Bar
I have tried adding and additional autoclass directive to the module
docstring, but everything that I've tried has given me an error.
How am I supposed to do this?
--
========================================================================
Google Where SkyNet meets Idiocracy
========================================================================