File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
import inspect
5
5
from collections import OrderedDict
6
6
from concurrent .futures import ThreadPoolExecutor
7
- from typing import Any , Callable , Coroutine , ParamSpec
7
+ from typing import Any , Callable , Union
8
8
9
9
import mongoengine
10
10
from asgiref .sync import sync_to_async as asgiref_sync_to_async
11
+ from asgiref .sync import SyncToAsync
11
12
from graphene import Node
12
13
from graphene .utils .trim_docstring import trim_docstring
13
14
from graphql import FieldNode
@@ -283,7 +284,7 @@ def sync_to_async(
283
284
func : Callable = None ,
284
285
thread_sensitive : bool = False ,
285
286
executor : Any = None , # noqa
286
- ) -> Callable [[ ParamSpec ( "_P" )], Coroutine [ Any , Any , Any ]]:
287
+ ) -> Union [ SyncToAsync , Callable [[ Callable [... , Any ]], SyncToAsync ]]:
287
288
"""
288
289
Wrapper over sync_to_async from asgiref.sync
289
290
Defaults to thread insensitive with ThreadPoolExecutor of n workers
You can’t perform that action at this time.
0 commit comments