Skip to content

Commit 2313ffe

Browse files
committed
fix: Lint issue
1 parent 6732ed0 commit 2313ffe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphene_mongo/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import inspect
55
from collections import OrderedDict
66
from concurrent.futures import ThreadPoolExecutor
7-
from typing import Any, Callable, Coroutine, ParamSpec
7+
from typing import Any, Callable, Union
88

99
import mongoengine
1010
from asgiref.sync import sync_to_async as asgiref_sync_to_async
11+
from asgiref.sync import SyncToAsync
1112
from graphene import Node
1213
from graphene.utils.trim_docstring import trim_docstring
1314
from graphql import FieldNode
@@ -283,7 +284,7 @@ def sync_to_async(
283284
func: Callable = None,
284285
thread_sensitive: bool = False,
285286
executor: Any = None, # noqa
286-
) -> Callable[[ParamSpec("_P")], Coroutine[Any, Any, Any]]:
287+
) -> Union[SyncToAsync, Callable[[Callable[..., Any]], SyncToAsync]]:
287288
"""
288289
Wrapper over sync_to_async from asgiref.sync
289290
Defaults to thread insensitive with ThreadPoolExecutor of n workers

0 commit comments

Comments
 (0)