File: demo_long.txt

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 (101 lines) | stat: -rw-r--r-- 6,754 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<module demo_long  # # Test Module

This …
    <var FOO_CONSTANT: int = 42  # A happy constant. ✨ …>
    <var FOO_SINGLETON: demo_long.Foo  # This variable is ann…>
    <var NO_DOCSTRING: int>
    <function def a_simple_function(a: str) -> str: ...  # This is a basic modu…>
    <var T = ~T>
    <function def a_complex_function(
        a: str,
        b: Union[demo_long.Foo, str],
        *,
        c: Optional[~T] = None
    ) -> Optional[~T]: ...  # This is a function w…>
    <class demo_long.Foo  # `Foo` is a basic cla…
        <method def __init__(self): ...  # The constructor is c…>
        <var an_attribute: Union[str, List[int]]  # A regular attribute …>
        <var a_class_attribute: ClassVar[str] = 'lots of foo!'  # An attribute with a …>
        <var a_constructor_only_attribute: int  # This attribute is de…>
        <var undocumented_constructor_attribute>
        <method def a_regular_function(self) -> demo_long.Foo: ...  # This is a regular me…>
        <var a_property: str  # This is a `@property…>
        <var a_cached_property: str  # This is a `@functool…>
        <@cache method def a_cached_function(self) -> str: ...  # This is method with …>
        <@classmethod class def a_class_method(cls) -> int: ...  # This is what a `@cla…>
        <var a_class_property: int  # This is what a `@cla…>
        <@staticmethod static def a_static_method(): ...  # This is what a `@sta…>
    >
    <class demo_long.Bar  # `Foo` is a basic cla…
        <method def __init__(self): ...  # inherited from demo_long.Foo.__init__, The constructor is c…>
        <var bar: str  # A new attribute defi…>
        <class demo_long.Bar.Baz  # This class is an att…
            <method def __init__(): ...>
            <method def wat(self): ...  # A regular method. Ab…>
        >
        <var an_attribute: Union[str, List[int]]  # inherited from demo_long.Foo.an_attribute, A regular attribute …>
        <var a_class_attribute: ClassVar[str] = 'lots of foo!'  # inherited from demo_long.Foo.a_class_attribute, An attribute with a …>
        <var a_constructor_only_attribute: int  # inherited from demo_long.Foo.a_constructor_only_attribute, This attribute is de…>
        <var undocumented_constructor_attribute  # inherited from demo_long.Foo.undocumented_constructor_attribute>
        <method def a_regular_function(self) -> demo_long.Foo: ...  # inherited from demo_long.Foo.a_regular_function, This is a regular me…>
        <var a_property: str  # inherited from demo_long.Foo.a_property, This is a `@property…>
        <var a_cached_property: str  # inherited from demo_long.Foo.a_cached_property, This is a `@functool…>
        <@cache method def a_cached_function(self) -> str: ...  # inherited from demo_long.Foo.a_cached_function, This is method with …>
        <@classmethod class def a_class_method(cls) -> int: ...  # inherited from demo_long.Foo.a_class_method, This is what a `@cla…>
        <var a_class_property: int  # inherited from demo_long.Foo.a_class_property, This is what a `@cla…>
        <@staticmethod static def a_static_method(): ...  # inherited from demo_long.Foo.a_static_method, This is what a `@sta…>
    >
    <function async def i_am_async(self) -> int: ...  # This is an example o…>
    <@cache function def fib(n): ...  # This is an example o…>
    <function def security(test=os.environ): ...  # Default values are g…>
    <class demo_long.DoubleInherit  # This is an example o…
        <method def __init__(self): ...  # inherited from demo_long.Foo.__init__, The constructor is c…>
        <var an_attribute: Union[str, List[int]]  # inherited from demo_long.Foo.an_attribute, A regular attribute …>
        <var a_class_attribute: ClassVar[str] = 'lots of foo!'  # inherited from demo_long.Foo.a_class_attribute, An attribute with a …>
        <var a_constructor_only_attribute: int  # inherited from demo_long.Foo.a_constructor_only_attribute, This attribute is de…>
        <var undocumented_constructor_attribute  # inherited from demo_long.Foo.undocumented_constructor_attribute>
        <method def a_regular_function(self) -> demo_long.Foo: ...  # inherited from demo_long.Foo.a_regular_function, This is a regular me…>
        <var a_property: str  # inherited from demo_long.Foo.a_property, This is a `@property…>
        <var a_cached_property: str  # inherited from demo_long.Foo.a_cached_property, This is a `@functool…>
        <@cache method def a_cached_function(self) -> str: ...  # inherited from demo_long.Foo.a_cached_function, This is method with …>
        <@classmethod class def a_class_method(cls) -> int: ...  # inherited from demo_long.Foo.a_class_method, This is what a `@cla…>
        <var a_class_property: int  # inherited from demo_long.Foo.a_class_property, This is what a `@cla…>
        <@staticmethod static def a_static_method(): ...  # inherited from demo_long.Foo.a_static_method, This is what a `@sta…>
        <method def wat(self): ...  # inherited from demo_long.Bar.Baz.wat, A regular method. Ab…>
    >
    <var CONST_B = 'yes'  # A constant without t…>
    <var CONST_NO_DOC = 'SHOULD NOT APPEAR'>
    <@dataclass class demo_long.DataDemo  # This is an example f…
        <method def __init__(self, a: int, a2: Sequence[str], a4: str = 'a4', b: bool = True): ...>
        <var a: int  # Again, we can docume…>
        <var a2: Sequence[str]>
        <var a3 = 'a3'>
        <var a4: str = 'a4'>
        <var b: bool = True  # This property is ass…>
    >
    <@dataclass class demo_long.DataDemoExtended
        <method def __init__(
            self,
            a: int,
            a2: Sequence[str],
            a4: str = 'a4',
            b: bool = True,
            c: str = '42'
        ): ...>
        <var c: str = '42'  # A new attribute.>
        <var a: int  # inherited from demo_long.DataDemo.a, Again, we can docume…>
        <var a2: Sequence[str]  # inherited from demo_long.DataDemo.a2>
        <var a3 = 'a3'  # inherited from demo_long.DataDemo.a3>
        <var a4: str = 'a4'  # inherited from demo_long.DataDemo.a4>
        <var b: bool = True  # inherited from demo_long.DataDemo.b, This property is ass…>
    >
    <class demo_long.EnumDemo  # This is an example o…
        <var RED = <EnumDemo.RED: 1>  # I am the red.>
        <var GREEN = <EnumDemo.GREEN: 2>  # I am green.>
        <var BLUE = <EnumDemo.BLUE: 3>>
        <var name  # inherited from enum.Enum.name, The name of the Enum…>
        <var value  # inherited from enum.Enum.value, The value of the Enu…>
    >
    <function def embed_image(): ...  # This docstring inclu…>
    <function def admonitions(): ...  # pdoc also supports b…>
>