Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove package and module name from sphinx function

it's any way to remove the package and or module name from sphinx doc?

Example: if exist a function called waa inside the module foo.bar, the rst code

.. automodule:: foo.bar     :members: 

will generate

foo.bar.waa() 

and i want to output

waa() 
like image 607
user2489206 Avatar asked Dec 31 '13 23:12

user2489206


1 Answers

You can change add_module_names to False in the file conf.py:

# If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = False 

Then foo.bar.my_function() will display as my_function().

like image 142
Cole Avatar answered Sep 18 '22 13:09

Cole