mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
rename typing module to avoid conflicts with stdlib typing
This commit is contained in:
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any, ContextManager, Deque, NamedTuple, Option
|
||||
from kitty.constants import kitten_exe, running_in_kitty
|
||||
from kitty.fast_data_types import monotonic, safe_pipe
|
||||
from kitty.types import DecoratedFunc, ParsedShortcut
|
||||
from kitty.typing import (
|
||||
from kitty.typing_compat import (
|
||||
AbstractEventLoop,
|
||||
BossType,
|
||||
Debug,
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import Any, ClassVar, DefaultDict, Deque, Generic, Optional, TypeVar
|
||||
|
||||
from kitty.conf.utils import positive_float, positive_int
|
||||
from kitty.fast_data_types import create_canvas
|
||||
from kitty.typing import GRT_C, CompletedProcess, GRT_a, GRT_d, GRT_f, GRT_m, GRT_o, GRT_t, HandlerType
|
||||
from kitty.typing_compat import GRT_C, CompletedProcess, GRT_a, GRT_d, GRT_f, GRT_m, GRT_o, GRT_t, HandlerType
|
||||
from kitty.utils import ScreenSize, fit_image, which
|
||||
|
||||
from .operations import cursor
|
||||
|
||||
@@ -19,7 +19,7 @@ from typing import Any, NamedTuple
|
||||
from kitty.constants import is_macos
|
||||
from kitty.fast_data_types import FILE_TRANSFER_CODE, close_tty, normal_tty, open_tty, parse_input_from_terminal, raw_tty
|
||||
from kitty.key_encoding import ALT, CTRL, SHIFT, backspace_key, decode_key_event, enter_key
|
||||
from kitty.typing import ImageManagerType, KeyEventType, Protocol
|
||||
from kitty.typing_compat import ImageManagerType, KeyEventType, Protocol
|
||||
from kitty.utils import ScreenSize, ScreenSizeGetter, screen_size_function, write_all
|
||||
|
||||
from .handler import Handler
|
||||
|
||||
@@ -11,7 +11,7 @@ from typing import Any, Optional, TypeVar, Union
|
||||
|
||||
from kitty.fast_data_types import Color
|
||||
from kitty.rgb import color_as_sharp, to_color
|
||||
from kitty.typing import GraphicsCommandType, HandlerType, ScreenSize, UnderlineLiteral
|
||||
from kitty.typing_compat import GraphicsCommandType, HandlerType, ScreenSize, UnderlineLiteral
|
||||
|
||||
from .operations_stub import CMD
|
||||
|
||||
@@ -461,7 +461,7 @@ def func_sig(func: Callable[..., Any]) -> Generator[str, None, None]:
|
||||
def as_type_stub() -> str:
|
||||
ans = [
|
||||
'from typing import * # noqa',
|
||||
'from kitty.typing import GraphicsCommandType, ScreenSize',
|
||||
'from kitty.typing_compat import GraphicsCommandType, ScreenSize',
|
||||
'from kitty.fast_data_types import Color',
|
||||
'import kitty.rgb',
|
||||
'import kittens.tui.operations',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from collections.abc import Sequence
|
||||
|
||||
from kitty.fast_data_types import monotonic
|
||||
from kitty.typing import TypedDict
|
||||
from kitty.typing_compat import TypedDict
|
||||
|
||||
|
||||
class SpinnerDef(TypedDict):
|
||||
|
||||
Reference in New Issue
Block a user