

def _load_ui_modules(self, modules):
    if isinstance(modules, types.ModuleType):
        self._load_ui_modules(dict(((n, getattr(modules, n)) for n in dir(modules))))
    elif isinstance(modules, list):
        for m in modules:
            self._load_ui_modules(modules)
    else:
        assert isinstance(modules, dict)
        for (name, cls) in modules.items():
            try:
                if issubclass(cls, UIModule):
                    self.ui_modules[name] = cls
            except TypeError:
                pass

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py Application._load_ui_modules/VarMisuse@74/88 `m`->`modules`