Fix mypy typing issue with importspec loader Optionalness (src/ModuleManager.py)
This commit is contained in:
parent
c77d8aaac8
commit
f94f233eb3
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ class ModuleManager(object):
|
|||
import_spec = importlib.util.spec_from_file_location(import_name, path)
|
||||
module = importlib.util.module_from_spec(import_spec)
|
||||
sys.modules[import_name] = module
|
||||
import_spec.loader.exec_module(module)
|
||||
loader = typing.cast(importlib.abc.Loader, import_spec.loader)
|
||||
loader.exec_module(module)
|
||||
|
||||
module_object_pointer = getattr(module, "Module", None)
|
||||
if not module_object_pointer:
|
||||
|
|
Loading…
Reference in a new issue