mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
or None
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
from typing import TYPE_CHECKING, Awaitable, Callable, List, Union
|
from typing import TYPE_CHECKING, Awaitable, Callable, List, Union
|
||||||
|
|
||||||
from typing_extensions import Protocol
|
|
||||||
|
|
||||||
from rich.segment import Segment
|
from rich.segment import Segment
|
||||||
|
from typing_extensions import Protocol
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .message import Message
|
from .message import Message
|
||||||
|
|||||||
@@ -126,7 +126,10 @@ def _spacing_examples(property_name: str) -> ContextSpecificBullets:
|
|||||||
|
|
||||||
|
|
||||||
def property_invalid_value_help_text(
|
def property_invalid_value_help_text(
|
||||||
property_name: str, context: StylingContext, *, suggested_property_name: str = None
|
property_name: str,
|
||||||
|
context: StylingContext,
|
||||||
|
*,
|
||||||
|
suggested_property_name: str | None = None,
|
||||||
) -> HelpText:
|
) -> HelpText:
|
||||||
"""Help text to show when the user supplies an invalid value for CSS property
|
"""Help text to show when the user supplies an invalid value for CSS property
|
||||||
property.
|
property.
|
||||||
@@ -301,7 +304,7 @@ def color_property_help_text(
|
|||||||
property_name: str,
|
property_name: str,
|
||||||
context: StylingContext,
|
context: StylingContext,
|
||||||
*,
|
*,
|
||||||
error: Exception = None,
|
error: Exception | None = None,
|
||||||
) -> HelpText:
|
) -> HelpText:
|
||||||
"""Help text to show when the user supplies an invalid value for a color
|
"""Help text to show when the user supplies an invalid value for a color
|
||||||
property. For example, an unparseable color string.
|
property. For example, an unparseable color string.
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ from ..geometry import Spacing
|
|||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from typing_extensions import Final
|
from typing_extensions import Final
|
||||||
from .types import EdgeType
|
|
||||||
|
|
||||||
VALID_VISIBILITY: Final = {"visible", "hidden"}
|
VALID_VISIBILITY: Final = {"visible", "hidden"}
|
||||||
VALID_DISPLAY: Final = {"block", "none"}
|
VALID_DISPLAY: Final = {"block", "none"}
|
||||||
|
|||||||
Reference in New Issue
Block a user