Skip to content

Commit

Permalink
Correct type hint for OneStyleAndTextTuple callable
Browse files Browse the repository at this point in the history
  • Loading branch information
joouha authored and jonathanslenders committed Nov 21, 2022
1 parent 99de961 commit 0ddf173
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prompt_toolkit/formatted_text/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
if TYPE_CHECKING:
from typing_extensions import Protocol

from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone

__all__ = [
"OneStyleAndTextTuple",
"StyleAndTextTuples",
Expand All @@ -18,7 +20,7 @@
]

OneStyleAndTextTuple = Union[
Tuple[str, str], Tuple[str, str, Callable[[MouseEvent], None]]
Tuple[str, str], Tuple[str, str, Callable[[MouseEvent], "NotImplementedOrNone"]]
]

# List of (style, text) tuples.
Expand Down

0 comments on commit 0ddf173

Please sign in to comment.