Skip to content

Commit bb1c336

Browse files
committed
Fix calling async class methods
1 parent ce529b2 commit bb1c336

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

trio_asyncio/adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __get__(self, obj, cls):
5656
we need to forward the original ``self`` to the wrapped method.
5757
"""
5858
if obj is None:
59-
return self.__call__
59+
return partial(self.__call__, cls)
6060
return partial(self.__call__, obj)
6161

6262
async def __call__(self, *args, **kwargs):
@@ -127,7 +127,7 @@ def __get__(self, obj, cls):
127127
we need to forward the original ``self`` to the wrapped method.
128128
"""
129129
if obj is None:
130-
return self.__call__
130+
return partial(self.__call__, cls)
131131
return partial(self.__call__, obj)
132132

133133
def __call__(self, *args, **kwargs):

0 commit comments

Comments
 (0)