summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autodoc/target/typed_vars.py
blob: 0fe7468c84f1469bb059017f61630bcaab74ba38 (plain)
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
#: attr1
attr1: str = ''
#: attr2
attr2: str
#: attr3
attr3 = ''  # type: str


class _Descriptor:
    def __init__(self, name):
        self.__doc__ = f"This is {name}"
    def __get__(self):
        pass


class Class:
    attr1: int = 0
    attr2: int
    attr3 = 0  # type: int

    descr4: int = _Descriptor("descr4")

    def __init__(self):
        self.attr4: int = 0     #: attr4
        self.attr5: int         #: attr5
        self.attr6 = 0          # type: int
        """attr6"""


class Derived(Class):
    attr7: int


Alias = Derived