mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Experiment
This commit is contained in:
@@ -26,12 +26,12 @@ from . import errors
|
|||||||
from ._cells import cell_len
|
from ._cells import cell_len
|
||||||
from ._loop import loop_last
|
from ._loop import loop_last
|
||||||
from .strip import Strip
|
from .strip import Strip
|
||||||
from ._typing import TypeAlias
|
|
||||||
from .geometry import NULL_OFFSET, Offset, Region, Size
|
from .geometry import NULL_OFFSET, Offset, Region, Size
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .widget import Widget
|
from .widget import Widget
|
||||||
|
from typing import TypeAlias
|
||||||
|
|
||||||
|
|
||||||
class ReflowResult(NamedTuple):
|
class ReflowResult(NamedTuple):
|
||||||
@@ -59,7 +59,7 @@ class MapGeometry(NamedTuple):
|
|||||||
|
|
||||||
|
|
||||||
# Maps a widget on to its geometry (information that describes its position in the composition)
|
# 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)
|
@rich.repr.auto(angular=True)
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info >= (3, 10):
|
if sys.version_info >= (3, 10):
|
||||||
from typing import TypeAlias
|
from typing import TypeAlias
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
@@ -8,7 +11,13 @@ else: # pragma: no cover
|
|||||||
if sys.version_info >= (3, 8):
|
if sys.version_info >= (3, 8):
|
||||||
from typing import Final, Literal, Protocol, TypedDict, runtime_checkable
|
from typing import Final, Literal, Protocol, TypedDict, runtime_checkable
|
||||||
else:
|
else:
|
||||||
from typing_extensions import Final, Literal, Protocol, TypedDict, runtime_checkable
|
from typing_extensions import (
|
||||||
|
Final,
|
||||||
|
Literal,
|
||||||
|
Protocol,
|
||||||
|
TypedDict,
|
||||||
|
runtime_checkable,
|
||||||
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Final",
|
"Final",
|
||||||
|
|||||||
Reference in New Issue
Block a user