From 4a93a24f747ac91f674ba3c6a99caac99796be0e Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 7 Dec 2019 17:09:13 -0400 Subject: [PATCH] cancel_previous(): use @functools.wraps --- src/python/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/utils.py b/src/python/utils.py index 0c786049..4db2d21a 100644 --- a/src/python/utils.py +++ b/src/python/utils.py @@ -10,6 +10,7 @@ import xml.etree.cElementTree as xml_etree # FIXME: bandit warning from datetime import timedelta from enum import Enum from enum import auto as autostr +from functools import wraps from pathlib import Path from types import ModuleType from typing import Any, Callable, Dict, Tuple, Type @@ -165,6 +166,7 @@ def cancel_previous(async_func): of that coroutine that may still be running. """ + @wraps(async_func) async def wrapper(*args, **kwargs): try: arg0_is_self = inspect.getfullargspec(async_func).args[0] == "self"