-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Expand file tree
/
Copy pathtypes.py
More file actions
16 lines (15 loc) · 611 Bytes
/
types.py
File metadata and controls
16 lines (15 loc) · 611 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from collections.abc import Callable, Iterator
type Callback = Callable[[], object]
type SimpleContextManager = Iterator[None]
type KeySpec = str # like r"\C-c"
type CommandName = str # like "interrupt"
type EventData = list[str]
type EventTuple = tuple[CommandName, EventData]
type CursorXY = tuple[int, int]
type Dimensions = tuple[int, int]
type ScreenInfoRow = tuple[int, list[int]]
type Keymap = tuple[tuple[KeySpec, CommandName], ...]
type Completer = Callable[[str, int], str | None]
type CharBuffer = list[str]
type CharWidths = list[int]
type CompletionAction = tuple[str, Callable[[], str | None]]