Skip to content

Commit c6383a7

Browse files
committed
fix typing bug from pyright 1.1.394
1 parent 595f3fb commit c6383a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

flogin/jsonrpc/results.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
from .responses import ErrorResponse, ExecuteResponse
2626

2727
if TYPE_CHECKING:
28-
from collections.abc import Callable, Coroutine, Iterable
28+
from collections.abc import Callable, Iterable
29+
from types import CoroutineType
2930

3031
from .._types.jsonrpc.result import ( # noqa: F401
3132
RawGlyph,
@@ -438,7 +439,9 @@ def from_anything(cls: type[Result], item: ConvertableToResult[Any]) -> Result[A
438439
@classmethod
439440
def create_with_partial(
440441
cls: type[Result],
441-
partial_callback: Callable[[], Coroutine[Any, Any, Any]],
442+
partial_callback: Callable[
443+
[], CoroutineType[Any, Any, ExecuteResponse | bool | None]
444+
],
442445
**kwargs: Unpack[ResultConstructorKwargs],
443446
) -> Result:
444447
r"""A quick and easy way to create a result with a callback without subclassing.

0 commit comments

Comments
 (0)