diff --git a/kitty/layout/grid.py b/kitty/layout/grid.py index c34a22671..5a7fcda9c 100644 --- a/kitty/layout/grid.py +++ b/kitty/layout/grid.py @@ -5,7 +5,7 @@ from functools import lru_cache from itertools import repeat from math import ceil, floor -from typing import Any, ClassVar, Literal +from typing import Any from kitty.borders import BorderColor from kitty.types import Edges, NeighborsMap, WindowMapper @@ -34,7 +34,7 @@ class Grid(Layout): name: str = 'grid' no_minimal_window_borders = True - drag_overlay_mode: ClassVar[Literal['axis_y']] = 'axis_y' + drag_overlay_mode = 'axis_y' def remove_all_biases(self) -> bool: self.biased_rows: dict[int, float] = {} diff --git a/kitty/layout/splits.py b/kitty/layout/splits.py index 617d9681b..b7bbaa92a 100644 --- a/kitty/layout/splits.py +++ b/kitty/layout/splits.py @@ -561,7 +561,7 @@ class Splits(Layout): needs_all_windows = True layout_opts = SplitsLayoutOpts({}) no_minimal_window_borders = True - drag_overlay_mode: ClassVar[Literal['free']] = 'free' + drag_overlay_mode = 'free' @property def default_axis_is_horizontal(self) -> bool | None: diff --git a/kitty/layout/tall.py b/kitty/layout/tall.py index f2ee2717e..2a1f1f614 100644 --- a/kitty/layout/tall.py +++ b/kitty/layout/tall.py @@ -4,7 +4,7 @@ import sys from collections.abc import Generator, Iterator, Sequence from itertools import islice, repeat -from typing import Any, ClassVar, Literal +from typing import Any from kitty.borders import BorderColor from kitty.conf.utils import to_bool @@ -136,7 +136,7 @@ class Tall(Layout): name = 'tall' main_is_horizontal = True no_minimal_window_borders = True - drag_overlay_mode: ClassVar[Literal['axis_y']] = 'axis_y' + drag_overlay_mode = 'axis_y' layout_opts = TallLayoutOpts({}) main_axis_layout = Layout.xlayout perp_axis_layout = Layout.ylayout @@ -382,6 +382,6 @@ class Fat(Tall): name = 'fat' main_is_horizontal = False - drag_overlay_mode: ClassVar[Literal['axis_x']] = 'axis_x' + drag_overlay_mode = 'axis_x' main_axis_layout = Layout.ylayout perp_axis_layout = Layout.xlayout diff --git a/kitty/layout/vertical.py b/kitty/layout/vertical.py index 7f0d55e7d..c69dde0dd 100644 --- a/kitty/layout/vertical.py +++ b/kitty/layout/vertical.py @@ -2,7 +2,7 @@ # License: GPLv3 Copyright: 2020, Kovid Goyal from collections.abc import Generator, Iterable -from typing import Any, ClassVar, Literal +from typing import Any from kitty.borders import BorderColor from kitty.types import Edges, NeighborsMap, WindowMapper @@ -64,7 +64,7 @@ class Vertical(Layout): name = 'vertical' main_is_horizontal = False no_minimal_window_borders = True - drag_overlay_mode: ClassVar[Literal['axis_y']] = 'axis_y' + drag_overlay_mode = 'axis_y' main_axis_layout = Layout.ylayout perp_axis_layout = Layout.xlayout @@ -156,6 +156,6 @@ class Horizontal(Vertical): name = 'horizontal' main_is_horizontal = True - drag_overlay_mode: ClassVar[Literal['axis_x']] = 'axis_x' + drag_overlay_mode = 'axis_x' main_axis_layout = Layout.xlayout perp_axis_layout = Layout.ylayout