Add types to the docstrings for a Binding

This commit is contained in:
Dave Pearson
2022-11-15 16:43:55 +00:00
parent 38e6d1dbcb
commit 94e02b8d24

View File

@@ -21,17 +21,17 @@ class NoBinding(Exception):
@dataclass(frozen=True) @dataclass(frozen=True)
class Binding: class Binding:
key: str key: str
"""Key to bind. This can also be a comma-separated list of keys to map multiple keys to a single action.""" """str: Key to bind. This can also be a comma-separated list of keys to map multiple keys to a single action."""
action: str action: str
"""Action to bind to.""" """str: Action to bind to."""
description: str description: str
"""Description of action.""" """str: Description of action."""
show: bool = True show: bool = True
"""Show the action in Footer, or False to hide.""" """bool: Show the action in Footer, or False to hide."""
key_display: str | None = None key_display: str | None = None
"""How the key should be shown in footer.""" """str | None: How the key should be shown in footer."""
universal: bool = False universal: bool = False
"""Allow forwarding from app to focused widget.""" """bool: Allow forwarding from app to focused widget."""
@rich.repr.auto @rich.repr.auto