mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
fix(deltachat_rpc_client): make @futuremethod decorator keep method metadata
Without this change methods decorated with `@futuremethod` do not appear in the documentation.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import argparse
|
import argparse
|
||||||
|
import functools
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
@@ -186,6 +187,7 @@ 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):
|
||||||
|
|||||||
Reference in New Issue
Block a user