

def create_manager_for_cls(self, class_):
    assert (class_ is not None)
    assert (manager_of_class(class_) is None)
    (manager, factory) = self._locate_extended_factory(class_)
    if (factory is None):
        factory = ClassManager
        manager = self(class_)
    self._check_conflicts(class_, factory)
    manager.factory = factory
    self.dispatch.class_instrument(class_)
    return manager

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/instrumentation.py InstrumentationFactory.create_manager_for_cls/VarMisuse@58/70 `factory`->`self`