From 50a344d5caa006df1cbb033da4101b6cfa71529c Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 6 Mar 2021 12:14:23 +0000 Subject: Fix return type of in_executor. Its return type varies, based on the Callable given. --- bot/exts/evergreen/profile_pic_modification/pfp_modify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot') diff --git a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py index 45a41e67..bba688aa 100644 --- a/bot/exts/evergreen/profile_pic_modification/pfp_modify.py +++ b/bot/exts/evergreen/profile_pic_modification/pfp_modify.py @@ -18,7 +18,7 @@ log = logging.getLogger(__name__) _EXECUTOR = ThreadPoolExecutor(10) -async def in_executor(func: t.Callable, *args) -> asyncio.Future: +async def in_executor(func: t.Callable, *args) -> t.Any: """Allows non-async functions to work in async functions.""" log.trace(f"Running {func.__name__} in an executor.") loop = asyncio.get_event_loop() -- cgit v1.2.3