| 1 |
#: attr1 |
| 2 |
attr1: str = '' |
| 3 |
#: attr2 |
| 4 |
attr2: str |
| 5 |
#: attr3 |
| 6 |
attr3 = '' # type: str |
| 7 |
|
| 8 |
|
| 9 |
class _Descriptor: |
| 10 |
def __init__(self, name): |
| 11 |
self.__doc__ = f'This is {name}' |
| 12 |
|
| 13 |
def __get__(self): # NoQA: PLE0302 |
| 14 |
pass |
| 15 |
|
| 16 |
|
| 17 |
class Class: |
| 18 |
attr1: int = 0 |
| 19 |
attr2: int |
| 20 |
attr3 = 0 # type: int |
| 21 |
|
| 22 |
descr4: int = _Descriptor('descr4') |
| 23 |
|
| 24 |
def __init__(self): |
| 25 |
# fmt: off |
| 26 |
self.attr4: int = 0 #: attr4 |
| 27 |
self.attr5: int #: attr5 |
| 28 |
self.attr6 = 0 # type: int |
| 29 |
# fmt: on |
| 30 |
"""attr6""" |
| 31 |
|
| 32 |
|
| 33 |
class Derived(Class): |
| 34 |
attr7: int |
| 35 |
|
| 36 |
|
| 37 |
Alias = Derived |