from ..context import Context from typing import TypeVar, Generic from sqlalchemy import BinaryExpression 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