mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Support type comments in `PropertyDocumenter` (#11298)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user