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

Function decorator

src/textual/_on.py:84–91  ·  view source on GitHub ↗

Store message and selector in function attribute, return callable unaltered.

(method: DecoratedType)

Source from the content-addressed store, hash-verified

82 ) from None
83
84 def decorator(method: DecoratedType) -> DecoratedType:
85 """Store message and selector in function attribute, return callable unaltered."""
86
87 if not hasattr(method, "_textual_on"):
88 setattr(method, "_textual_on", [])
89 getattr(method, "_textual_on").append((message_type, parsed_selectors))
90
91 return method
92
93 return decorator

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…