aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-27 23:31:58 +0100
committerGitHub <noreply@github.com>2023-12-27 23:31:58 +0100
commitd67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch)
tree8674f2f1570877cb653e7ddcff37ba00288de15a /contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py
parent1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff)
downloadydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz
Import libs 4 (#758)
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py
index 6abb595daf..62530f2b77 100644
--- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py
+++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py
@@ -40,8 +40,9 @@ from abc import ABCMeta, abstractmethod, abstractproperty
from inspect import isawaitable
from typing import (
TYPE_CHECKING,
- Awaitable,
+ Any,
Callable,
+ Coroutine,
Hashable,
Sequence,
Tuple,
@@ -89,7 +90,8 @@ __all__ = [
# This is mainly used in case of mouse move events, to prevent excessive
# repainting during mouse move events.
KeyHandlerCallable = Callable[
- ["KeyPressEvent"], Union["NotImplementedOrNone", Awaitable["NotImplementedOrNone"]]
+ ["KeyPressEvent"],
+ Union["NotImplementedOrNone", Coroutine[Any, Any, "NotImplementedOrNone"]],
]
@@ -125,7 +127,7 @@ class Binding:
# If the handler is a coroutine, create an asyncio task.
if isawaitable(result):
- awaitable = cast(Awaitable["NotImplementedOrNone"], result)
+ awaitable = cast(Coroutine[Any, Any, "NotImplementedOrNone"], result)
async def bg_task() -> None:
result = await awaitable