change self.modules to be a dict of str:LoadedModule, not str:BaseModule

This commit is contained in:
jesopo 2018-12-09 11:22:30 +00:00
parent ac71cfa4fa
commit 8c3f87b029

View file

@ -61,7 +61,7 @@ class ModuleManager(object):
self.log = log self.log = log
self.directory = directory self.directory = directory
self.modules = {} # type: typing.Dict[str, BaseModule] self.modules = {} # type: typing.Dict[str, LoadedModule]
self.waiting_requirement = {} # type: typing.Dict[str, typing.Set[str]] self.waiting_requirement = {} # type: typing.Dict[str, typing.Set[str]]
def list_modules(self) -> typing.List[str]: def list_modules(self) -> typing.List[str]:
@ -146,7 +146,7 @@ class ModuleManager(object):
[name, str(e)]) [name, str(e)])
raise raise
self.modules[loaded_module.name] = loaded_module.module self.modules[loaded_module.name] = loaded_module
if loaded_module.name in self.waiting_requirement: if loaded_module.name in self.waiting_requirement:
for requirement_name in self.waiting_requirement[ for requirement_name in self.waiting_requirement[
loaded_module.name]: loaded_module.name]: