mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add types to the docstrings for a Binding
This commit is contained in:
@@ -21,17 +21,17 @@ class NoBinding(Exception):
|
||||
@dataclass(frozen=True)
|
||||
class Binding:
|
||||
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 to bind to."""
|
||||
"""str: Action to bind to."""
|
||||
description: str
|
||||
"""Description of action."""
|
||||
"""str: Description of action."""
|
||||
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
|
||||
"""How the key should be shown in footer."""
|
||||
"""str | None: How the key should be shown in footer."""
|
||||
universal: bool = False
|
||||
"""Allow forwarding from app to focused widget."""
|
||||
"""bool: Allow forwarding from app to focused widget."""
|
||||
|
||||
|
||||
@rich.repr.auto
|
||||
|
||||
Reference in New Issue
Block a user