Add some docstrings

This commit is contained in:
Darren Burns
2022-01-19 16:04:11 +00:00
parent 1410648e36
commit 3640afc517
2 changed files with 12 additions and 0 deletions

View File

@@ -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
):

View File

@@ -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)