mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
fix(deltachat_rpc_client): make sphinx documentation display method parameters
This commit is contained in:
@@ -187,13 +187,9 @@ class futuremethod: # noqa: N801
|
|||||||
"""Decorator for async methods."""
|
"""Decorator for async methods."""
|
||||||
|
|
||||||
def __init__(self, func):
|
def __init__(self, func):
|
||||||
functools.update_wrapper(self, func)
|
|
||||||
self._func = func
|
self._func = func
|
||||||
|
|
||||||
def __get__(self, instance, owner=None):
|
def __get__(self, instance, owner=None):
|
||||||
if instance is None:
|
|
||||||
return self
|
|
||||||
|
|
||||||
def future(*args):
|
def future(*args):
|
||||||
generator = self._func(instance, *args)
|
generator = self._func(instance, *args)
|
||||||
res = next(generator)
|
res = next(generator)
|
||||||
@@ -206,6 +202,7 @@ class futuremethod: # noqa: N801
|
|||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
@functools.wraps(self._func)
|
||||||
def wrapper(*args):
|
def wrapper(*args):
|
||||||
f = future(*args)
|
f = future(*args)
|
||||||
return f()
|
return f()
|
||||||
|
|||||||
Reference in New Issue
Block a user