Print a table summarising the bindings. The table contains columns for the key(s) that trigger the binding, the method that it calls (and tries to link it to the widget itself), and the description of the binding.
(widget: str, bindings: list[Binding])
| 15 | |
| 16 | |
| 17 | def print_bindings(widget: str, bindings: list[Binding]) -> None: |
| 18 | """Print a table summarising the bindings. |
| 19 | |
| 20 | The table contains columns for the key(s) that trigger the binding, |
| 21 | the method that it calls (and tries to link it to the widget itself), |
| 22 | and the description of the binding. |
| 23 | """ |
| 24 | if bindings: |
| 25 | print("BINDINGS") |
| 26 | print('"""') |
| 27 | print("| Key(s) | Description |") |
| 28 | print("| :- | :- |") |
| 29 | |
| 30 | for binding in bindings: |
| 31 | print(f"| {binding.key} | {binding.description} |") |
| 32 | |
| 33 | if bindings: |
| 34 | print('"""') |
| 35 | |
| 36 | |
| 37 | def print_component_classes(classes: set[str]) -> None: |
no outgoing calls
no test coverage detected
searching dependent graphs…