from fooder.context import Context from typing import TypeVar, Generic T = TypeVar("T") class ControllerBase: def __init__(self, ctx: Context) -> None: self.ctx = ctx class ModelController(Generic[T], ControllerBase): def __init__(self, ctx: Context, obj: T): super().__init__(ctx) self.obj = obj