Make the single instance data type checked

This commit is contained in:
Kovid Goyal
2023-01-23 17:45:11 +05:30
parent 60791bb57b
commit d8bbb16d5e
3 changed files with 23 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
from enum import Enum
from functools import update_wrapper
from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, Iterator, NamedTuple, Tuple, TypeVar, Union
from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, Iterator, Mapping, NamedTuple, Optional, Sequence, Tuple, TypedDict, TypeVar, Union
if TYPE_CHECKING:
from kitty.fast_data_types import SingleKey
@@ -11,6 +11,16 @@ if TYPE_CHECKING:
_T = TypeVar('_T')
class SingleInstanceData(TypedDict):
cmd: str
args: Sequence[str]
cmdline_args_for_open: Sequence[str]
cwd: str
session_data: str
environ: Mapping[str, str]
notify_on_os_window_death: Optional[str]
class OverlayType(Enum):
transient: str = 'transient'
main: str = 'main'