mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Docstrings
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#uber1 {
|
#uber1 {
|
||||||
layout: vertical;
|
layout: vertical;
|
||||||
background: dark_green;
|
background: dark_green;
|
||||||
overflow-x: x;
|
|
||||||
border: heavy white;
|
border: heavy white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -556,6 +556,14 @@ def fractional_property_help_text(
|
|||||||
|
|
||||||
|
|
||||||
def offset_property_help_text(context: StylingContext | None) -> HelpText:
|
def offset_property_help_text(context: StylingContext | None) -> HelpText:
|
||||||
|
"""Help text to show when the user supplies an invalid value for the offset property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
context (StylingContext | None): The context the property is being used in.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
HelpText: Renderable for displaying the help text for this property
|
||||||
|
"""
|
||||||
return HelpText(
|
return HelpText(
|
||||||
summary="Invalid value for [i]offset[/] property",
|
summary="Invalid value for [i]offset[/] property",
|
||||||
bullets=[
|
bullets=[
|
||||||
@@ -588,6 +596,11 @@ def offset_property_help_text(context: StylingContext | None) -> HelpText:
|
|||||||
|
|
||||||
|
|
||||||
def align_help_text() -> HelpText:
|
def align_help_text() -> HelpText:
|
||||||
|
"""Help text to show when the user supplies an invalid value for a `align`.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
HelpText: Renderable for displaying the help text for this property
|
||||||
|
"""
|
||||||
return HelpText(
|
return HelpText(
|
||||||
summary="Invalid value for [i]align[/] property",
|
summary="Invalid value for [i]align[/] property",
|
||||||
bullets=[
|
bullets=[
|
||||||
@@ -614,6 +627,14 @@ def align_help_text() -> HelpText:
|
|||||||
|
|
||||||
|
|
||||||
def offset_single_axis_help_text(property_name: str) -> HelpText:
|
def offset_single_axis_help_text(property_name: str) -> HelpText:
|
||||||
|
"""Help text to show when the user supplies an invalid value for an offset-* property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
property_name (str): The name of the property
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
HelpText: Renderable for displaying the help text for this property
|
||||||
|
"""
|
||||||
return HelpText(
|
return HelpText(
|
||||||
summary=f"Invalid value for [i]{property_name}[/]",
|
summary=f"Invalid value for [i]{property_name}[/]",
|
||||||
bullets=[
|
bullets=[
|
||||||
@@ -632,6 +653,15 @@ def offset_single_axis_help_text(property_name: str) -> HelpText:
|
|||||||
def style_flags_property_help_text(
|
def style_flags_property_help_text(
|
||||||
property_name: str, value: str, context: StylingContext | None
|
property_name: str, value: str, context: StylingContext | None
|
||||||
) -> HelpText:
|
) -> HelpText:
|
||||||
|
"""Help text to show when the user supplies an invalid value for a style flags property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
property_name (str): The name of the property
|
||||||
|
context (StylingContext | None): The context the property is being used in.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
HelpText: Renderable for displaying the help text for this property
|
||||||
|
"""
|
||||||
property_name = _contextualize_property_name(property_name, context)
|
property_name = _contextualize_property_name(property_name, context)
|
||||||
return HelpText(
|
return HelpText(
|
||||||
summary=f"Invalid value '{value}' in [i]{property_name}[/] property",
|
summary=f"Invalid value '{value}' in [i]{property_name}[/] property",
|
||||||
|
|||||||
Reference in New Issue
Block a user