On Tuesday, March 3, 2020 at 11:25:20 PM UTC+5, Connor McClellan wrote:
>
> 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/82b99062-72fd-4c84-aa85-931462b14411%40googlegroups.com.

Reply via email to