MCPcopy Index your code
hub / github.com/Textualize/textual / make_bindings

Method make_bindings

tests/test_binding_inheritance.py:173–185  ·  view source on GitHub ↗

Make the binding list for testing an app. Args: action_prefix (str, optional): An optional prefix for the action name. Returns: list[Binding]: The resulting list of bindings.

(action_prefix: str = "")

Source from the content-addressed store, hash-verified

171
172 @staticmethod
173 def make_bindings(action_prefix: str = "") -> list[Binding]:
174 """Make the binding list for testing an app.
175
176 Args:
177 action_prefix (str, optional): An optional prefix for the action name.
178
179 Returns:
180 list[Binding]: The resulting list of bindings.
181 """
182 return [
183 Binding(key, f"{action_prefix}record('{key}')", key)
184 for key in [*AppKeyRecorder.ALPHAS, *MOVEMENT_KEYS]
185 ]
186
187 def __init__(self) -> None:
188 """Initialise the recording app."""

Calls 1

BindingClass · 0.90

Tested by

no test coverage detected