Skip to content

Commit

Permalink
fix: Lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinand-c committed Dec 9, 2023
1 parent 6732ed0 commit 2313ffe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions graphene_mongo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2313ffe

Please sign in to comment.