def make_mwm(country: AnyStr, env: Env): world_stages = { WORLD_NAME: [ StageIndex, StageCitiesIdsWorld, StagePrepareRoutingWorld, StageRoutingWorld, StageMwmStatistics, ], WORLD_COASTS_NAME: [StageIndex, StageMwmStatistics], } mwm_stages = [ StageIndex, StageUgc, StagePopularity, StageSrtm, StageIsolinesInfo, StageDescriptions, StageRouting, StageRoutingTransit, StageMwmDiffs, StageMwmStatistics, ] for stage in world_stages.get(country, mwm_stages): stage(country=country)(env) env.finish_mwm(country)
def make_mwm(country: AnyStr, env: Env): if country == WORLD_NAME: StageIndex(country=country)(env) StageCitiesIdsWorld(country=country)(env) elif country == WORLD_COASTS_NAME: StageIndex(country=country)(env) else: StageIndex(country=country)(env) StageUgc(country=country)(env) StagePopularity(country=country)(env) StageSrtm(country=country)(env) StageDescriptions(country=country)(env) StageRouting(country=country)(env) StageRoutingTransit(country=country)(env) StageMwmStatistics(country=country)(env) env.finish_mwm(country)