sphinx-autodoc2 icon indicating copy to clipboard operation
sphinx-autodoc2 copied to clipboard

Question: remove module name from path

Open jeertmans opened this issue 2 years ago • 2 comments

Hello,

First, thanks for your work!

Do you know if it's possible to remove the full name from a class or function reference?

As shown below, it's even more bizarre that the name is shortened in the PARAMETERS sections, but not in the function signature.

I'd like to have Point everywhere, instead of differt2d.geometry.Point. The same applies for others.

I have set the add_module_names variable to False in conf.py, but it doesn't work (I guess it's because we are not using autodoc here).

image

jeertmans avatar May 24 '23 09:05 jeertmans

The Sphinx config python_use_unqualified_type_names = True seems to do what you request for me. It looks like sphinx-autodoc2 only generates py::function directives and Sphinx itself decides how to render them.

https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-python_use_unqualified_type_names

davidselassie avatar Jan 10 '24 19:01 davidselassie

Thanks for help @davidselassie, I will test that when I can :)

jeertmans avatar Jan 10 '24 20:01 jeertmans