Skip to content

Commit da8d614

Browse files
committed
Fix signals autodoc annotations
1 parent 1e86871 commit da8d614

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/sdbus/autodoc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def can_document_member(cls, member: Any, *args: Any) -> bool:
7474
def update_annotations(self,
7575
parent: DbusInterfaceCommonAsync) -> None:
7676

77+
assert isinstance(self.object, DbusPropertyAsync)
7778
property_annotation = \
7879
self.object.property_getter.__annotations__['return']
7980

@@ -104,8 +105,9 @@ def can_document_member(cls, member: Any, *args: Any) -> bool:
104105
def update_annotations(self,
105106
parent: DbusInterfaceCommonAsync) -> None:
106107

108+
assert isinstance(self.object, DbusSignalAsync)
107109
signal_annotation = \
108-
self.object.original_function.__annotations__['return']
110+
self.object.__annotations__['return']
109111

110112
parent.__annotations__[self.object_name] = signal_annotation
111113

src/sdbus/dbus_common_elements.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,4 @@ def __init__(self,
249249
self.flags = flags
250250

251251
self.__doc__ = original_method.__doc__
252+
self.__annotations__ = original_method.__annotations__

0 commit comments

Comments
 (0)