mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add some docstrings
This commit is contained in:
@@ -6,6 +6,15 @@ from rich.style import StyleType
|
||||
|
||||
|
||||
class Blank:
|
||||
"""
|
||||
Render an empty rectangle.
|
||||
|
||||
Args:
|
||||
style (StyleType): Style to apply to the box.
|
||||
width (int, optional): Width of the box in number of cells. Will expand to fit parent if ``None``.
|
||||
height (int, optional): Height of the box in number of cells. Will expand to fit parent if ``None``.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, style: StyleType, width: int | None = None, height: int | None = None
|
||||
):
|
||||
|
||||
@@ -236,6 +236,9 @@ class Styles:
|
||||
return None
|
||||
|
||||
def reset(self) -> None:
|
||||
"""
|
||||
Reset internal style rules to ``None``, reverting to default styles.
|
||||
"""
|
||||
for rule_name in INTERNAL_RULE_NAMES:
|
||||
setattr(self, rule_name, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user