mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-06 05:00:23 +03:00
Spaces
This commit is contained in:
parent
04f9ed557a
commit
c6ceff5533
|
@ -979,13 +979,13 @@ class AsyncClassWrapper:
|
|||
|
||||
def __getattr__(self, item):
|
||||
w = getattr(self.wrapped, item)
|
||||
async def wrapper(*args,**kwargs):
|
||||
async def wrapper(*args, **kwargs):
|
||||
val = w(*args, **kwargs)
|
||||
return await val if inspect.isawaitable(val) else val
|
||||
|
||||
if inspect.isfunction(w) or inspect.ismethod(w):
|
||||
if callable(w):
|
||||
return wrapper
|
||||
elif isinstance(w,property):
|
||||
elif isinstance(w, property):
|
||||
return w.fget(self.wrapped)
|
||||
else:
|
||||
return w
|
||||
|
|
Loading…
Reference in New Issue
Block a user