cadrumo.entrypoints.tui.components.app_access module¶
Static narrowing for Textual’s unparameterised app accessor.
- class TypedAppAccess[source]¶
Bases:
objectNarrow the inherited
appaccessor to a parameterisedApp.Textual declares its shared accessor as
getters.app(App)against the bare generic, so everyself.appread resolves asApp[Unknown]and poisons the type of whatever it is passed to. The framework’s documented remedy,app = getters.app(MyApp), binds a descriptor that asserts the running app’s concrete class – but these screens are mounted by more than one host app, so that assertion would be a new runtime failure mode.This mixin instead states the accessor’s type for the checker only. It adds no runtime behaviour: the class body is empty outside
TYPE_CHECKING, and the inherited accessor keeps serving every read.