I have a class method with an argument that ends in an underscore, from_
, and I am using autoclass
to generate the documentation for the class. I want the argument from_
to appear as normal text in my Sphinx documentation, but currently it appears as a hyperlink.
Here is a simplified version of the class method with the docstring:
class Twilio:
def get_messages(to=None, from_=None):
"""
Get messages.
`Args:`
to: str
Receiver.
from_: str
Sender.
`Returns:`
Messages: dict
"""
return fetch_messages(to=to, from_=from_)
And I am generating the documentation for this class using:
.. autoclass :: Twilio
:inherited-members:
The problem can be seen in the get_messages
function at the very bottom of this page, you can see that it is formatted as a hyperlink.