I have been trying to use Sphinx-autodoc to have my child classes __init__
inherit the arguments of their parent classes __init__. This would
essentially replace the *args argument in the child docstring with the
arguments of the parent.
Python code:
class Parent(object):
def __init__(self, parent_argument):
"""
Parent class
Args:
parent_argument (int): Argument of the parent.
"""
self.arg1 = parent_argument
class Child(Parent):
def __init__(self, child_argument, *args):
"""
Child class
Args:
child_argument (int): Argument of the child
*args:
"""
super().__init__(*args)
self.arg2 = child_argument
and the resulting docs would like this:
Is this currently possible with autodoc?
Thanks,
Connor
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/e0b075a1-e979-40d4-8b2f-52daab5dff36%40googlegroups.com.