0

Let's say I have two files foo.py and __init__.py in directory src. The files look something like this (the actual files that I have a much more complicated but not relevant to the problem).

foo.py file:

class Foo:
    """ Very long description of the class"""
    pass

__init__.py file:

from .foo import Foo as Foo2

Additional doc.rst file for documentation generation:

.. autoclass:: Foo2

Now, when I use Sphinx Autodoc to generate the documentation for Foo2, it shows "alias of foo".

Is it possible to override this and show "Very long description of the class" instead? I have dozens of classes for which I would like to show the source description rather than just "alias of xyz".

Nivek
  • 1
  • 2

0 Answers0