aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-06 22:41:37 +0000
committerGravatar jesopo2019-02-06 22:41:37 +0000
commitf94f233eb3b03488ddfeae7e47ea1b340d033938 (patch)
treef6d38da5558195f91f65c095bfc0990e00044a54 /src
parentDefault `error` to `""`, `_client_first`/`_salted_password`/`_auth_message` t... (diff)
signature
Fix mypy typing issue with importspec loader Optionalness (src/ModuleManager.py)
Diffstat (limited to 'src')
-rw-r--r--src/ModuleManager.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ModuleManager.py b/src/ModuleManager.py
index f0cb8580..fb500a87 100644
--- a/src/ModuleManager.py
+++ b/src/ModuleManager.py
@@ -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: