rename typing module to avoid conflicts with stdlib typing

This commit is contained in:
Kovid Goyal
2025-04-27 09:44:50 +05:30
parent e42d410ee4
commit d548a6fcf4
46 changed files with 45 additions and 45 deletions

View File

@@ -3,7 +3,7 @@
import sys import sys
from kitty.typing import BossType, TypedDict from kitty.typing_compat import BossType, TypedDict
from ..tui.handler import result_handler from ..tui.handler import result_handler

View File

@@ -12,7 +12,7 @@ from kitty.key_encoding import encode_key_event
from kitty.rc.base import MATCH_TAB_OPTION, MATCH_WINDOW_OPTION from kitty.rc.base import MATCH_TAB_OPTION, MATCH_WINDOW_OPTION
from kitty.remote_control import create_basic_command, encode_send from kitty.remote_control import create_basic_command, encode_send
from kitty.short_uuid import uuid4 from kitty.short_uuid import uuid4
from kitty.typing import KeyEventType, ScreenSize from kitty.typing_compat import KeyEventType, ScreenSize
from ..tui.handler import Handler from ..tui.handler import Handler
from ..tui.line_edit import LineEdit from ..tui.line_edit import LineEdit

View File

@@ -27,7 +27,7 @@ from kitty.fonts.list import create_family_groups
from kitty.fonts.render import display_bitmap from kitty.fonts.render import display_bitmap
from kitty.options.types import Options from kitty.options.types import Options
from kitty.options.utils import parse_font_spec from kitty.options.utils import parse_font_spec
from kitty.typing import NotRequired from kitty.typing_compat import NotRequired
from kitty.utils import screen_size_function from kitty.utils import screen_size_function
if TYPE_CHECKING: if TYPE_CHECKING:

View File

@@ -10,7 +10,7 @@ from kitty.cli_stub import HintsCLIOptions
from kitty.clipboard import set_clipboard_string, set_primary_selection from kitty.clipboard import set_clipboard_string, set_primary_selection
from kitty.constants import website_url from kitty.constants import website_url
from kitty.fast_data_types import get_options from kitty.fast_data_types import get_options
from kitty.typing import BossType, WindowType from kitty.typing_compat import BossType, WindowType
from kitty.utils import get_editor, resolve_custom_file from kitty.utils import get_editor, resolve_custom_file
from ..tui.handler import result_handler from ..tui.handler import result_handler

View File

@@ -31,7 +31,7 @@ from kitty.fast_data_types import (
from kitty.os_window_size import WindowSizeData, edge_spacing from kitty.os_window_size import WindowSizeData, edge_spacing
from kitty.simple_cli_definitions import listen_on_defn from kitty.simple_cli_definitions import listen_on_defn
from kitty.types import LayerShellConfig from kitty.types import LayerShellConfig
from kitty.typing import BossType, EdgeLiteral from kitty.typing_compat import BossType, EdgeLiteral
from kitty.utils import log_error from kitty.utils import log_error
quake = ( quake = (

View File

@@ -15,7 +15,7 @@ from typing import Any, Optional
from kitty.cli import parse_args from kitty.cli import parse_args
from kitty.cli_stub import RemoteFileCLIOptions from kitty.cli_stub import RemoteFileCLIOptions
from kitty.constants import cache_dir from kitty.constants import cache_dir
from kitty.typing import BossType from kitty.typing_compat import BossType
from kitty.utils import SSHConnectionData, command_for_open, get_editor, open_cmd from kitty.utils import SSHConnectionData, command_for_open, get_editor, open_cmd
from ..tui.handler import result_handler from ..tui.handler import result_handler

View File

@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any, NamedTuple, cast
from kitty.constants import list_kitty_resources from kitty.constants import list_kitty_resources
from kitty.types import run_once from kitty.types import run_once
from kitty.typing import BossType, WindowType from kitty.typing_compat import BossType, WindowType
from kitty.utils import resolve_abs_or_config_path from kitty.utils import resolve_abs_or_config_path
aliases = {'url_hints': 'hints'} aliases = {'url_hints': 'hints'}

View File

@@ -1,6 +1,6 @@
from typing import Callable, Union from typing import Callable, Union
from kitty.typing import ReadableBuffer, WriteableBuffer from kitty.typing_compat import ReadableBuffer, WriteableBuffer
class RsyncError(Exception): class RsyncError(Exception):
pass pass

View File

@@ -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.constants import kitten_exe, running_in_kitty
from kitty.fast_data_types import monotonic, safe_pipe from kitty.fast_data_types import monotonic, safe_pipe
from kitty.types import DecoratedFunc, ParsedShortcut from kitty.types import DecoratedFunc, ParsedShortcut
from kitty.typing import ( from kitty.typing_compat import (
AbstractEventLoop, AbstractEventLoop,
BossType, BossType,
Debug, Debug,

View File

@@ -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.conf.utils import positive_float, positive_int
from kitty.fast_data_types import create_canvas 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 kitty.utils import ScreenSize, fit_image, which
from .operations import cursor from .operations import cursor

View File

@@ -19,7 +19,7 @@ from typing import Any, NamedTuple
from kitty.constants import is_macos 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.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.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 kitty.utils import ScreenSize, ScreenSizeGetter, screen_size_function, write_all
from .handler import Handler from .handler import Handler

View File

@@ -11,7 +11,7 @@ from typing import Any, Optional, TypeVar, Union
from kitty.fast_data_types import Color from kitty.fast_data_types import Color
from kitty.rgb import color_as_sharp, to_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 from .operations_stub import CMD
@@ -461,7 +461,7 @@ def func_sig(func: Callable[..., Any]) -> Generator[str, None, None]:
def as_type_stub() -> str: def as_type_stub() -> str:
ans = [ ans = [
'from typing import * # noqa', 'from typing import * # noqa',
'from kitty.typing import GraphicsCommandType, ScreenSize', 'from kitty.typing_compat import GraphicsCommandType, ScreenSize',
'from kitty.fast_data_types import Color', 'from kitty.fast_data_types import Color',
'import kitty.rgb', 'import kitty.rgb',
'import kittens.tui.operations', 'import kittens.tui.operations',

View File

@@ -4,7 +4,7 @@
from collections.abc import Sequence from collections.abc import Sequence
from kitty.fast_data_types import monotonic from kitty.fast_data_types import monotonic
from kitty.typing import TypedDict from kitty.typing_compat import TypedDict
class SpinnerDef(TypedDict): class SpinnerDef(TypedDict):

View File

@@ -2,7 +2,7 @@
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net> # License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
from kitty.typing import BossType from kitty.typing_compat import BossType
from ..tui.handler import result_handler from ..tui.handler import result_handler

View File

@@ -7,7 +7,7 @@ from typing import NamedTuple
from .fast_data_types import BORDERS_PROGRAM, add_borders_rect, get_options, init_borders_program, os_window_has_background_image from .fast_data_types import BORDERS_PROGRAM, add_borders_rect, get_options, init_borders_program, os_window_has_background_image
from .shaders import program_for from .shaders import program_for
from .typing import LayoutType from .typing_compat import LayoutType
from .utils import color_as_int from .utils import color_as_int
from .window_list import WindowGroup, WindowList from .window_list import WindowGroup, WindowList

View File

@@ -123,7 +123,7 @@ from .session import Session, create_sessions, get_os_window_sizing_data
from .shaders import load_shader_programs from .shaders import load_shader_programs
from .tabs import SpecialWindow, SpecialWindowInstance, Tab, TabDict, TabManager from .tabs import SpecialWindow, SpecialWindowInstance, Tab, TabDict, TabManager
from .types import _T, AsyncResponse, LayerShellConfig, SingleInstanceData, WindowSystemMouseEvent, ac from .types import _T, AsyncResponse, LayerShellConfig, SingleInstanceData, WindowSystemMouseEvent, ac
from .typing import PopenType, TypedDict from .typing_compat import PopenType, TypedDict
from .utils import ( from .utils import (
cleanup_ssh_control_masters, cleanup_ssh_control_masters,
func_name, func_name,

View File

@@ -6,7 +6,7 @@ from collections.abc import Generator
from typing import Any from typing import Any
from .cli_stub import HintsCLIOptions from .cli_stub import HintsCLIOptions
from .typing import MarkType from .typing_compat import MarkType
def mark(text: str, args: HintsCLIOptions, Mark: type[MarkType], extra_cli_args: list[str], *a: Any) -> Generator[MarkType, None, None]: def mark(text: str, args: HintsCLIOptions, Mark: type[MarkType], extra_cli_args: list[str], *a: Any) -> Generator[MarkType, None, None]:

View File

@@ -15,7 +15,7 @@ from .fast_data_types import parse_cli_from_spec, wcswidth
from .options.types import Options as KittyOpts from .options.types import Options as KittyOpts
from .simple_cli_definitions import CompletionSpec, CompletionType, OptionDict, kitty_options_spec, serialize_as_go_string from .simple_cli_definitions import CompletionSpec, CompletionType, OptionDict, kitty_options_spec, serialize_as_go_string
from .types import run_once from .types import run_once
from .typing import BadLineType from .typing_compat import BadLineType
is_macos is_macos
go_type_map = { go_type_map = {

View File

@@ -12,7 +12,7 @@ from .constants import config_dir
from .fast_data_types import Color, get_boss, get_options, glfw_get_system_color_theme, patch_color_profiles, patch_global_colors, set_os_window_chrome from .fast_data_types import Color, get_boss, get_options, glfw_get_system_color_theme, patch_color_profiles, patch_global_colors, set_os_window_chrome
from .options.types import Options, nullable_colors from .options.types import Options, nullable_colors
from .rgb import color_from_int from .rgb import color_from_int
from .typing import WindowType from .typing_compat import WindowType
ColorsSpec = dict[str, Optional[int]] ColorsSpec = dict[str, Optional[int]]
TransparentBackgroundColors = tuple[tuple[Color, float], ...] TransparentBackgroundColors = tuple[tuple[Color, float], ...]

View File

@@ -18,7 +18,7 @@ from ..constants import _plat, is_macos
from ..fast_data_types import Color from ..fast_data_types import Color
from ..rgb import to_color as as_color from ..rgb import to_color as as_color
from ..types import ConvertibleToNumbers, ParsedShortcut, run_once from ..types import ConvertibleToNumbers, ParsedShortcut, run_once
from ..typing import Protocol from ..typing_compat import Protocol
from ..utils import expandvars, log_error, shlex_split from ..utils import expandvars, log_error, shlex_split
key_pat = re.compile(r'([a-zA-Z][a-zA-Z0-9_-]*)\s+(.+)$') key_pat = re.compile(r'([a-zA-Z][a-zA-Z0-9_-]*)\s+(.+)$')

View File

@@ -13,7 +13,7 @@ from .conf.utils import load_config as _load_config
from .constants import cache_dir, defconf from .constants import cache_dir, defconf
from .options.types import Options, defaults, option_names from .options.types import Options, defaults, option_names
from .options.utils import KeyboardMode, KeyboardModeMap, KeyDefinition, MouseMap, MouseMapping, build_action_aliases from .options.utils import KeyboardMode, KeyboardModeMap, KeyDefinition, MouseMap, MouseMapping, build_action_aliases
from .typing import TypedDict from .typing_compat import TypedDict
from .utils import log_error from .utils import log_error

View File

@@ -9,7 +9,7 @@ from kitty.notifications import MacOSNotificationCategory
from kitty.options.types import Options from kitty.options.types import Options
from kitty.simple_cli_definitions import OptionDict from kitty.simple_cli_definitions import OptionDict
from kitty.types import LayerShellConfig, SignalInfo from kitty.types import LayerShellConfig, SignalInfo
from kitty.typing import EdgeLiteral, NotRequired, ReadableBuffer, WriteableBuffer from kitty.typing_compat import EdgeLiteral, NotRequired, ReadableBuffer, WriteableBuffer
# Constants {{{ # Constants {{{
SCALE_BITS: int SCALE_BITS: int

View File

@@ -24,7 +24,7 @@ from typing import IO, Any, DefaultDict, Deque, Union
from kittens.transfer.utils import IdentityCompressor, ZlibCompressor, abspath, expand_home, home_path from kittens.transfer.utils import IdentityCompressor, ZlibCompressor, abspath, expand_home, home_path
from kitty.fast_data_types import ESC_OSC, FILE_TRANSFER_CODE, AES256GCMDecrypt, add_timer, base64_decode, base64_encode, get_boss, get_options, monotonic from kitty.fast_data_types import ESC_OSC, FILE_TRANSFER_CODE, AES256GCMDecrypt, add_timer, base64_decode, base64_encode, get_boss, get_options, monotonic
from kitty.types import run_once from kitty.types import run_once
from kitty.typing import ReadableBuffer, WriteableBuffer from kitty.typing_compat import ReadableBuffer, WriteableBuffer
from .utils import log_error from .utils import log_error

View File

@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Literal, NamedTuple, TypedDict, TypeVar, Union
from kitty.fast_data_types import ParsedFontFeature from kitty.fast_data_types import ParsedFontFeature
from kitty.types import run_once from kitty.types import run_once
from kitty.typing import CoreTextFont, FontConfigPattern from kitty.typing_compat import CoreTextFont, FontConfigPattern
from kitty.utils import shlex_split from kitty.utils import shlex_split
if TYPE_CHECKING: if TYPE_CHECKING:

View File

@@ -9,7 +9,7 @@ from functools import lru_cache
from typing import NamedTuple from typing import NamedTuple
from kitty.fast_data_types import CTFace, coretext_all_fonts from kitty.fast_data_types import CTFace, coretext_all_fonts
from kitty.typing import CoreTextFont from kitty.typing_compat import CoreTextFont
from kitty.utils import log_error from kitty.utils import log_error
from . import Descriptor, DescriptorVar, ListedFont, Score, Scorer, VariableData, family_name_to_key from . import Descriptor, DescriptorVar, ListedFont, Score, Scorer, VariableData, family_name_to_key

View File

@@ -20,7 +20,7 @@ from kitty.fast_data_types import (
FC_WEIGHT_SEMIBOLD as FC_WEIGHT_BOLD, FC_WEIGHT_SEMIBOLD as FC_WEIGHT_BOLD,
) )
from kitty.fast_data_types import fc_match as fc_match_impl from kitty.fast_data_types import fc_match as fc_match_impl
from kitty.typing import FontConfigPattern from kitty.typing_compat import FontConfigPattern
from . import Descriptor, DescriptorVar, ListedFont, Score, Scorer, VariableData, family_name_to_key from . import Descriptor, DescriptorVar, ListedFont, Score, Scorer, VariableData, family_name_to_key

View File

@@ -27,7 +27,7 @@ from kitty.fast_data_types import (
from kitty.options.types import Options, defaults from kitty.options.types import Options, defaults
from kitty.options.utils import parse_font_spec from kitty.options.utils import parse_font_spec
from kitty.types import _T from kitty.types import _T
from kitty.typing import CoreTextFont, FontConfigPattern from kitty.typing_compat import CoreTextFont, FontConfigPattern
from kitty.utils import log_error from kitty.utils import log_error
from . import family_name_to_key from . import family_name_to_key

View File

@@ -23,7 +23,7 @@ from .fast_data_types import (
) )
from .options.types import Options from .options.types import Options
from .options.utils import KeyboardMode, KeyDefinition, KeyMap from .options.utils import KeyboardMode, KeyDefinition, KeyMap
from .typing import ScreenType from .typing_compat import ScreenType
if TYPE_CHECKING: if TYPE_CHECKING:
from .window import Window from .window import Window

View File

@@ -10,7 +10,7 @@ from kitty.borders import BorderColor
from kitty.fast_data_types import Region, set_active_window, viewport_for_window from kitty.fast_data_types import Region, set_active_window, viewport_for_window
from kitty.options.types import Options from kitty.options.types import Options
from kitty.types import Edges, WindowGeometry from kitty.types import Edges, WindowGeometry
from kitty.typing import TypedDict, WindowType from kitty.typing_compat import TypedDict, WindowType
from kitty.window_list import WindowGroup, WindowList from kitty.window_list import WindowGroup, WindowList

View File

@@ -9,7 +9,7 @@ from typing import Any
from kitty.borders import BorderColor from kitty.borders import BorderColor
from kitty.types import Edges from kitty.types import Edges
from kitty.typing import WindowType from kitty.typing_compat import WindowType
from kitty.window_list import WindowGroup, WindowList from kitty.window_list import WindowGroup, WindowList
from .base import BorderLine, Layout, LayoutData, LayoutDimension, ListOfWindows, NeighborsMap, layout_dimension, lgd from .base import BorderLine, Layout, LayoutData, LayoutDimension, ListOfWindows, NeighborsMap, layout_dimension, lgd

View File

@@ -6,7 +6,7 @@ from typing import Any, NamedTuple, Optional, Union
from kitty.borders import BorderColor from kitty.borders import BorderColor
from kitty.types import Edges, WindowGeometry from kitty.types import Edges, WindowGeometry
from kitty.typing import EdgeLiteral, WindowType from kitty.typing_compat import EdgeLiteral, WindowType
from kitty.window_list import WindowGroup, WindowList from kitty.window_list import WindowGroup, WindowList
from .base import BorderLine, Layout, LayoutOpts, NeighborsMap, blank_rects_for_window, lgd, window_geometry_from_layouts from .base import BorderLine, Layout, LayoutOpts, NeighborsMap, blank_rects_for_window, lgd, window_geometry_from_layouts

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net> # License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net>
from kitty.typing import WindowType from kitty.typing_compat import WindowType
from kitty.window_list import WindowList from kitty.window_list import WindowList
from .base import Layout, NeighborsMap from .base import Layout, NeighborsMap

View File

@@ -8,7 +8,7 @@ from typing import Any
from kitty.borders import BorderColor from kitty.borders import BorderColor
from kitty.conf.utils import to_bool from kitty.conf.utils import to_bool
from kitty.types import Edges from kitty.types import Edges
from kitty.typing import EdgeLiteral, WindowType from kitty.typing_compat import EdgeLiteral, WindowType
from kitty.window_list import WindowGroup, WindowList from kitty.window_list import WindowGroup, WindowList
from .base import ( from .base import (

View File

@@ -6,7 +6,7 @@ from typing import Any
from kitty.borders import BorderColor from kitty.borders import BorderColor
from kitty.types import Edges from kitty.types import Edges
from kitty.typing import WindowType from kitty.typing_compat import WindowType
from kitty.window_list import WindowGroup, WindowList from kitty.window_list import WindowGroup, WindowList
from .base import BorderLine, Layout, LayoutData, LayoutDimension, NeighborsMap, lgd from .base import BorderLine, Layout, LayoutData, LayoutDimension, NeighborsMap, lgd

View File

@@ -24,7 +24,7 @@ from .fast_data_types import (
os_window_is_invisible, os_window_is_invisible,
) )
from .types import run_once from .types import run_once
from .typing import WindowType from .typing_compat import WindowType
from .utils import get_custom_window_icon, log_error, sanitize_control_codes from .utils import get_custom_window_icon, log_error, sanitize_control_codes
debug_desktop_integration = False # set by NotificationManager debug_desktop_integration = False # set by NotificationManager

View File

@@ -16,7 +16,7 @@ from .fast_data_types import get_options
from .guess_mime_type import guess_type from .guess_mime_type import guess_type
from .options.utils import ActionAlias, MapType, resolve_aliases_and_parse_actions from .options.utils import ActionAlias, MapType, resolve_aliases_and_parse_actions
from .types import run_once from .types import run_once
from .typing import MatchType from .typing_compat import MatchType
from .utils import expandvars, get_editor, log_error, resolved_shell from .utils import expandvars, get_editor, log_error, resolved_shell

View File

@@ -8,7 +8,7 @@ from .constants import is_macos, is_wayland
from .fast_data_types import get_options from .fast_data_types import get_options
from .options.types import Options from .options.types import Options
from .types import FloatEdges from .types import FloatEdges
from .typing import EdgeLiteral from .typing_compat import EdgeLiteral
from .utils import log_error from .utils import log_error

View File

@@ -33,7 +33,7 @@ from .fast_data_types import (
) )
from .rc.base import NoResponse, PayloadGetter, all_command_names, command_for_name from .rc.base import NoResponse, PayloadGetter, all_command_names, command_for_name
from .types import AsyncResponse from .types import AsyncResponse
from .typing import BossType, WindowType from .typing_compat import BossType, WindowType
from .utils import TTYIO, log_error, parse_address_spec, resolve_custom_file from .utils import TTYIO, log_error, parse_address_spec, resolve_custom_file
active_async_requests: dict[str, float] = {} active_async_requests: dict[str, float] = {}

View File

@@ -14,7 +14,7 @@ from .layout.interface import all_layouts
from .options.types import Options from .options.types import Options
from .options.utils import resize_window, to_layout_names, window_size from .options.utils import resize_window, to_layout_names, window_size
from .os_window_size import WindowSize, WindowSizeData, WindowSizes from .os_window_size import WindowSize, WindowSizeData, WindowSizes
from .typing import SpecialWindowInstance from .typing_compat import SpecialWindowInstance
from .utils import expandvars, log_error, resolve_custom_file, resolved_shell, shlex_split from .utils import expandvars, log_error, resolve_custom_file, resolved_shell, shlex_split
if TYPE_CHECKING: if TYPE_CHECKING:

View File

@@ -31,7 +31,7 @@ from .fast_data_types import (
from .progress import ProgressState from .progress import ProgressState
from .rgb import alpha_blend, color_as_sgr, color_from_int, to_color from .rgb import alpha_blend, color_as_sgr, color_from_int, to_color
from .types import WindowGeometry, run_once from .types import WindowGeometry, run_once
from .typing import EdgeLiteral, PowerlineStyle from .typing_compat import EdgeLiteral, PowerlineStyle
from .utils import color_as_int, log_error, sgr_sanitizer_pat from .utils import color_as_int, log_error, sgr_sanitizer_pat

View File

@@ -53,7 +53,7 @@ from .layout.interface import create_layout_object_for, evict_cached_layouts
from .progress import ProgressState from .progress import ProgressState
from .tab_bar import TabBar, TabBarData from .tab_bar import TabBar, TabBarData
from .types import ac from .types import ac
from .typing import EdgeLiteral, SessionTab, SessionType, TypedDict from .typing_compat import EdgeLiteral, SessionTab, SessionType, TypedDict
from .utils import cmdline_for_hold, log_error, platform_window_id, resolved_shell, shlex_split, which from .utils import cmdline_for_hold, log_error, platform_window_id, resolved_shell, shlex_split, which
from .window import CwdRequest, Watchers, Window, WindowDict from .window import CwdRequest, Watchers, Window, WindowDict
from .window_list import WindowList from .window_list import WindowList

View File

@@ -33,7 +33,7 @@ from .constants import (
from .fast_data_types import WINDOW_FULLSCREEN, WINDOW_HIDDEN, WINDOW_MAXIMIZED, WINDOW_MINIMIZED, WINDOW_NORMAL, Color, Shlex, get_options, monotonic, open_tty from .fast_data_types import WINDOW_FULLSCREEN, WINDOW_HIDDEN, WINDOW_MAXIMIZED, WINDOW_MINIMIZED, WINDOW_NORMAL, Color, Shlex, get_options, monotonic, open_tty
from .fast_data_types import timed_debug_print as _timed_debug_print from .fast_data_types import timed_debug_print as _timed_debug_print
from .types import run_once from .types import run_once
from .typing import AddressFamily, PopenType, StartupCtx from .typing_compat import AddressFamily, PopenType, StartupCtx
if TYPE_CHECKING: if TYPE_CHECKING:
import tarfile import tarfile

View File

@@ -92,7 +92,7 @@ from .progress import Progress
from .rgb import to_color from .rgb import to_color
from .terminfo import get_capabilities from .terminfo import get_capabilities
from .types import MouseEvent, OverlayType, WindowGeometry, ac, run_once from .types import MouseEvent, OverlayType, WindowGeometry, ac, run_once
from .typing import BossType, ChildType, EdgeLiteral, TabType, TypedDict from .typing_compat import BossType, ChildType, EdgeLiteral, TabType, TypedDict
from .utils import ( from .utils import (
color_as_int, color_as_int,
docs_url, docs_url,

View File

@@ -10,7 +10,7 @@ from typing import Any, Deque, Union
from .fast_data_types import Color, get_options from .fast_data_types import Color, get_options
from .types import OverlayType, WindowGeometry from .types import OverlayType, WindowGeometry
from .typing import EdgeLiteral, TabType, WindowType from .typing_compat import EdgeLiteral, TabType, WindowType
WindowOrId = Union[WindowType, int] WindowOrId = Union[WindowType, int]
group_id_counter = count(start=1) group_id_counter = count(start=1)