sphinx/tests/roots/test-ext-autodoc/target/private.py
Takeshi KOMIYA ce52a90d92 Fix #8592: autodoc: :meta public: does not effect to variables
To control the visibility of variables, ModuleDocumenter have to load
docstring of them on `get_object_members()` phase.  This reimplements
it and `get_module_members()` helper to fetch docstring on earlier
phase (as ClassDocumenter does).
2020-12-27 22:21:34 +09:00

16 lines
282 B
Python

def private_function(name):
"""private_function is a docstring().
:meta private:
"""
def _public_function(name):
"""public_function is a docstring().
:meta public:
"""
PRIVATE_CONSTANT = None #: :meta private:
_PUBLIC_CONSTANT = None #: :meta public: