| 1 |
import sys |
| 2 |
|
| 3 |
TYPE_CHECKING = False |
| 4 |
if sys.version_info[:2] < (3, 14) or TYPE_CHECKING: |
| 5 |
TypeCheckingOnlyName = int |
| 6 |
|
| 7 |
|
| 8 |
class Foo: |
| 9 |
"""docstring""" |
| 10 |
|
| 11 |
@property |
| 12 |
def prop1(self) -> int: |
| 13 |
"""docstring""" |
| 14 |
|
| 15 |
@classmethod |
| 16 |
@property |
| 17 |
def prop2(cls) -> int: |
| 18 |
"""docstring""" |
| 19 |
|
| 20 |
@property |
| 21 |
def prop1_with_type_comment(self): |
| 22 |
# type: () -> int |
| 23 |
"""docstring""" |
| 24 |
|
| 25 |
@classmethod |
| 26 |
@property |
| 27 |
def prop2_with_type_comment(cls): |
| 28 |
# type: () -> int |
| 29 |
"""docstring""" |
| 30 |
|
| 31 |
@property |
| 32 |
def prop3_with_undefined_anotation(self) -> TypeCheckingOnlyName: |
| 33 |
"""docstring""" |