Zahin Zaman
Zahin Zaman

Reputation: 260

How to make sphinx specify full module path for documented parameters?

I'm using sphinx to auto document a class. The constructor looks something like this:

from PyQt6.QtCore import QEasingCurve

class MyClass:
    def __init__(animationType=QEasingCurve.Type.OutCubic):
        # constructor function

When I generate the docs for this class, the animationType parameter is documented like this:

enter image description here

I don't want it to specify only half the path like this. I want it to say animationType=PyQt6.QtCore.Qt.QEasingCurve.Type. How can I do this?

This is what my reStructuredText source file looks like:

MyClass
=======

.. automodule:: MyModule.MyClass
   :members:
   :undoc-members:
   :show-inheritance:

Upvotes: 1

Views: 324

Answers (1)

SilverRainZ
SilverRainZ

Reputation: 316

Just import PyQt6 and use PyQt6.QtCore.Qt.QEasingCurve.Type in your code

Upvotes: 1

Related Questions