My question is very similar to the one here: Remove package and module name from sphinx function
Is there a way to remove/hide package and module names in sphinx only fo
One option is to use reST markup for cross referencing syntax like so:
If you prefix the content with ~, the link text will only be the last component of the target. For example, :py:meth:`~Queue.Queue.get` will refer to Queue.Queue.get but only display get as the link text.
If you prefix the content with ~, the link text will only be the last component of the target. For example,
~
:py:meth:`~Queue.Queue.get`
will refer to Queue.Queue.get but only display get as the link text.
Queue.Queue.get
get