Remove package and module name from sphinx function

后端 未结 1 1631
野性不改
野性不改 2020-12-11 00:06

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



        
相关标签:
1条回答
  • 2020-12-11 00:48

    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().

    0 讨论(0)
提交回复
热议问题