roshan pradhan
unread,Mar 18, 2025, 8:16:55 PMMar 18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sphinx-users
Hey everyone,
I'm customizing Sphinx's autodoc extension to modify how class and function names are displayed. In particular, I want to display a shortened name which can be used for importing instead of a fully qualified name. For example, sympy.sets.sets.Set can be shortened to sympy.Set as it is accessible from the top-level namespace.
The issue is that when I do this, cross-references break, i.e., Sphinx can't find the [source] link to the code on GitHub. Is there a way to modify how autodoc displays names while keeping cross-references working? If anyone has done something similar or knows of a solution, I'd really appreciate some guidance or example code.