sphinx/tests/roots/test-ext-autodoc/target/private.py
Anselm Kruis 336885c4e2 Add test cases for #8180
The test checks, if ":meta private:" and ":meta public:" have an effect
in attributes of a class. Currently the new test cases fail.
The fix is in the next commit.
2022-05-23 02:04:03 +09:00

28 lines
556 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:
class Foo:
#: A public class attribute whose name starts with an underscore.
#:
#: :meta public:
_public_attribute = 47
#: A private class attribute whose name does not start with an underscore.
#:
#: :meta private:
private_attribute = 11