From dd13d0314bbd392e8c7e8dc533e35800300aaae1 Mon Sep 17 00:00:00 2001 From: Abhijeet Kaur Date: Sat, 26 Aug 2017 04:36:35 +0530 Subject: [PATCH] bots: Improve code-style by using 'return' once. --- zulip_bots/zulip_bots/run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip_bots/zulip_bots/run.py b/zulip_bots/zulip_bots/run.py index 6d9ae9f..e762ef7 100755 --- a/zulip_bots/zulip_bots/run.py +++ b/zulip_bots/zulip_bots/run.py @@ -17,19 +17,19 @@ from zulip_bots.provision import provision_bot def import_module_from_source(path, name=None): - if name is None: + if not name: name = splitext(basename(path))[0] if six.PY2: import imp module = imp.load_source(name, path) - return module else: import importlib.util spec = importlib.util.spec_from_file_location(name, path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) - return module + + return module def parse_args():