From 7ad3324aaaa0f562cc669eb99d87f00a4f6811e3 Mon Sep 17 00:00:00 2001 From: Alena Volkova Date: Wed, 11 Oct 2017 18:17:10 -0400 Subject: [PATCH] mypy: zulip: Fix errors in integrations/log2zulip/log2zulip. --- tools/run-mypy | 1 - zulip/integrations/log2zulip/log2zulip | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/run-mypy b/tools/run-mypy index d31e0fb..cb8249f 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -19,7 +19,6 @@ os.chdir(os.path.dirname(TOOLS_DIR)) sys.path.append(os.path.dirname(TOOLS_DIR)) exclude = """ -zulip/integrations/log2zulip/log2zulip zulip/integrations/perforce/zulip_perforce_config.py zulip/integrations/perforce/git_p4.py zulip/integrations/svn/zulip_svn_config.py diff --git a/zulip/integrations/log2zulip/log2zulip b/zulip/integrations/log2zulip/log2zulip index d0d922f..abdacfd 100755 --- a/zulip/integrations/log2zulip/log2zulip +++ b/zulip/integrations/log2zulip/log2zulip @@ -97,7 +97,7 @@ def process_logs(): open(data_file_path, "w").write(json.dumps(new_data)) if __name__ == "__main__": - parser = zulip.add_default_arguments(argparse.ArgumentParser()) # type: argparse.ArgumentParser3 + parser = zulip.add_default_arguments(argparse.ArgumentParser()) # type: argparse.ArgumentParser parser.add_argument("--control-path", default="/etc/log2zulip.conf") args = parser.parse_args() @@ -115,7 +115,7 @@ if __name__ == "__main__": zulip_client = zulip.init_from_options(args) try: log_files = json.loads(open(args.control_path, "r").read()) - except (json.JSONDecodeError, IOError): + except (json.JSONDecodeError, IOError): # type: ignore # error: Cannot determine type of 'IOError' print("Could not load control data from %s" % (args.control_path,)) traceback.print_exc() sys.exit(1)