Support type comments in `PropertyDocumenter` (#11298)

This commit is contained in:
picnixz
2023-04-06 23:56:17 +02:00
committed by GitHub
parent 26eb2ef7c4
commit aba392d87f
7 changed files with 115 additions and 23 deletions

View File

@@ -5,3 +5,8 @@ class Foo:
@cached_property
def prop(self) -> int:
return 1
@cached_property
def prop_with_type_comment(self):
# type: () -> int
return 1

View File

@@ -9,3 +9,14 @@ class Foo:
@property
def prop2(self) -> int:
"""docstring"""
@property
def prop1_with_type_comment(self):
# type: () -> int
"""docstring"""
@classmethod
@property
def prop2_with_type_comment(self):
# type: () -> int
"""docstring"""