From 3e20593da2cd33073d197641722b0e77aea9bcd9 Mon Sep 17 00:00:00 2001 From: Sivagiri Visakan Date: Sat, 16 Jun 2018 22:00:17 +0530 Subject: [PATCH] bots/finder: Make `name` a non-default parameter in import_module_from_source. --- zulip_bots/zulip_bots/finder.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zulip_bots/zulip_bots/finder.py b/zulip_bots/zulip_bots/finder.py index 3985e92..7c5ae20 100644 --- a/zulip_bots/zulip_bots/finder.py +++ b/zulip_bots/zulip_bots/finder.py @@ -5,9 +5,7 @@ from typing import Any, Optional, Text, Tuple current_dir = os.path.dirname(os.path.abspath(__file__)) -def import_module_from_source(path: Text, name: Optional[Text]=None) -> Any: - if not name: - name = splitext(basename(path))[0] +def import_module_from_source(path: Text, name: Text) -> Any: # importlib.util.module_from_spec is supported from Python3.5 py_version = sys.version_info