This commit is contained in:
Will McGugan
2023-02-07 12:01:18 +00:00
parent 7e7367f8f6
commit f2d96e6e62
3 changed files with 6 additions and 5 deletions

View File

@@ -1,8 +1,7 @@
from typing import TYPE_CHECKING, Awaitable, Callable, List, Union
from typing_extensions import Protocol
from rich.segment import Segment
from typing_extensions import Protocol
if TYPE_CHECKING:
from .message import Message

View File

@@ -126,7 +126,10 @@ def _spacing_examples(property_name: str) -> ContextSpecificBullets:
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:
"""Help text to show when the user supplies an invalid value for CSS property
property.
@@ -301,7 +304,7 @@ def color_property_help_text(
property_name: str,
context: StylingContext,
*,
error: Exception = None,
error: Exception | None = None,
) -> HelpText:
"""Help text to show when the user supplies an invalid value for a color
property. For example, an unparseable color string.

View File

@@ -5,7 +5,6 @@ from ..geometry import Spacing
if typing.TYPE_CHECKING:
from typing_extensions import Final
from .types import EdgeType
VALID_VISIBILITY: Final = {"visible", "hidden"}
VALID_DISPLAY: Final = {"block", "none"}