Override function declaration in autodoc for sphinx
问题 I have a module that goes something like this: #!/usr/bin/env python #: Documentation here. #: blah blah blah foobar = r\'Some really long regex here.\' def myfunc(val=foobar): \'\'\'Blah blah blah\'\'\' pass ...and I have a .rst file that goes something like this: :mod:`my_module` Module ----------------------- ..automodule:: my_module :members: :private-members: :show-inheritance: When I build the documentation, I get an html file with a snippet that goes like this: mymodule.foobar. foobar