mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
typealias import
This commit is contained in:
@@ -4,10 +4,14 @@ import inspect
|
||||
|
||||
import rich.repr
|
||||
from rich.console import RenderableType
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from ._context import active_app
|
||||
from ._log import LogGroup, LogVerbosity
|
||||
from ._typing import TypeAlias
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Callable, TypeAlias
|
||||
|
||||
__all__ = ["log", "panic", "__version__"] # type: ignore
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import lru_cache
|
||||
from typing import cast, Tuple, Union
|
||||
from typing import cast, Tuple, TYPE_CHECKING, Union
|
||||
|
||||
from rich.segment import Segment
|
||||
from rich.style import Style
|
||||
|
||||
from .color import Color
|
||||
from .css.types import EdgeStyle, EdgeType
|
||||
from ._typing import TypeAlias
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import TypeAlias
|
||||
|
||||
INNER = 1
|
||||
OUTER = 2
|
||||
|
||||
@@ -59,7 +59,7 @@ class MapGeometry(NamedTuple):
|
||||
|
||||
|
||||
# Maps a widget on to its geometry (information that describes its position in the composition)
|
||||
CompositorMap: TypeAlias = dict[Widget, MapGeometry]
|
||||
CompositorMap: TypeAlias = "dict[Widget, MapGeometry]"
|
||||
|
||||
|
||||
@rich.repr.auto(angular=True)
|
||||
|
||||
Reference in New Issue
Block a user