From 2313ffe497936f7b7248073f482818232901fadc Mon Sep 17 00:00:00 2001 From: Abhinand C Date: Sat, 9 Dec 2023 13:30:02 +0530 Subject: [PATCH] fix: Lint issue --- graphene_mongo/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene_mongo/utils.py b/graphene_mongo/utils.py index fe47736..51fc5b2 100644 --- a/graphene_mongo/utils.py +++ b/graphene_mongo/utils.py @@ -4,10 +4,11 @@ import inspect from collections import OrderedDict from concurrent.futures import ThreadPoolExecutor -from typing import Any, Callable, Coroutine, ParamSpec +from typing import Any, Callable, Union import mongoengine from asgiref.sync import sync_to_async as asgiref_sync_to_async +from asgiref.sync import SyncToAsync from graphene import Node from graphene.utils.trim_docstring import trim_docstring from graphql import FieldNode @@ -283,7 +284,7 @@ def sync_to_async( func: Callable = None, thread_sensitive: bool = False, executor: Any = None, # noqa -) -> Callable[[ParamSpec("_P")], Coroutine[Any, Any, Any]]: +) -> Union[SyncToAsync, Callable[[Callable[..., Any]], SyncToAsync]]: """ Wrapper over sync_to_async from asgiref.sync Defaults to thread insensitive with ThreadPoolExecutor of n workers