File: visibility.py

package info (click to toggle)
python-pdoc 15.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,192 kB
  • sloc: python: 8,013; javascript: 1,156; makefile: 18; sh: 3
file content (42 lines) | stat: -rwxr-xr-x 859 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
Example where only the these children should be rendered:
 * `__private_func_explicitly_public` and
 * `public_func`
"""


class Undocumented:
    # Not shown because no docstring.
    pass


def public_func_marked_private():
    """
    This is a public method that's not shown because it's marked as @private.
    """


def _protected_func():
    """
    This is a protected method that's not shown because its name starts with _.
    """


def __private_func():
    """
    This is a private method that's not shown because its name starts with __.
    """


def __private_func_explicitly_public():
    """@public
    This is a private method that's shown because it is explicitly marked
    as public.
    """


def public_func():
    """
    This is another public method that's shown. It should show without additional
    whitespace above.
    """