MCPcopy
hub / github.com/Textualize/textual / main

Function main

tools/widget_documentation.py:57–75  ·  view source on GitHub ↗

Main entrypoint. Iterates over all widgets and prints docs tables.

()

Source from the content-addressed store, hash-verified

55
56
57def main() -> None:
58 """Main entrypoint.
59
60 Iterates over all widgets and prints docs tables.
61 """
62
63 widgets: list[str] = textual.widgets.__all__
64
65 for widget in widgets:
66 w = getattr(textual.widgets, widget)
67 bindings: list[Binding] = w.__dict__.get("BINDINGS", [])
68 component_classes: set[str] = getattr(w, "COMPONENT_CLASSES", set())
69
70 if bindings or component_classes:
71 print(widget)
72 print()
73 print_bindings(widget, bindings)
74 print_component_classes(component_classes)
75 print()
76
77
78if __name__ == "__main__":

Callers 1

Calls 3

print_bindingsFunction · 0.85
print_component_classesFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…