bots/finder: Make name a non-default parameter in import_module_from_source.

This commit is contained in:
Sivagiri Visakan 2018-06-16 22:00:17 +05:30 committed by showell
parent 09a7894a34
commit 3e20593da2

View file

@ -5,9 +5,7 @@ from typing import Any, Optional, Text, Tuple
current_dir = os.path.dirname(os.path.abspath(__file__)) current_dir = os.path.dirname(os.path.abspath(__file__))
def import_module_from_source(path: Text, name: Optional[Text]=None) -> Any: def import_module_from_source(path: Text, name: Text) -> Any:
if not name:
name = splitext(basename(path))[0]
# importlib.util.module_from_spec is supported from Python3.5 # importlib.util.module_from_spec is supported from Python3.5
py_version = sys.version_info py_version = sys.version_info