def __init__(self, *modules: ModuleAssembly, agg_checks: Iterable[IsAggregationType] = (), follow_imports: bool = True): self.app = Application() if follow_imports: self._solver = RecursiveModuleAssemblySolver() else: self._solver = StrictModuleAssemblySolver() self._global_registry = GlobalRegistry() self._agg_registry = AggRegistry() self._agg_registry.include_globals(agg_checks) self._modules = modules self._init()
def cyclic_dependency_app(self) -> Application: return Application(modules={self.a_module, self.b_cd_module}, )
def bootstrap_app(self) -> Application: return Application( modules={self.b_bs_module, self.a_module, self.c_bs_module}, )
def missing_assignment_app(self) -> Application: return Application(modules={self.a_ma_module, self.b_ma_module}, )
def missing_import_app(self) -> Application: return Application(modules={self.b_module}, )
def cyclic_import_app(self) -> Application: return Application(modules={*self.a_b_ci_modules}, )
def inconsistent_app(self): return Application(modules={self.inconsistent_module}, )
def valid_app(self) -> Application: return Application( modules={self.c_module, self.b_module, self.a_module}, )