From 8b4e87754616ceb28777035526094e01517e68d5 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 22 Dec 2017 10:20:30 -0800 Subject: [PATCH] mypy: Amend upload-file example, to pass with strict-optional. --- zulip/zulip/examples/upload-file | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zulip/zulip/examples/upload-file b/zulip/zulip/examples/upload-file index 29e5a35..f2312d5 100755 --- a/zulip/zulip/examples/upload-file +++ b/zulip/zulip/examples/upload-file @@ -47,9 +47,8 @@ options = parser.parse_args() client = zulip.init_from_options(options) -file = None # type: IO[Any] if options.file_path: - file = open(options.file_path, 'rb') + file = open(options.file_path, 'rb') # type: IO[Any] else: file = StringIO('This is a test file.') file.name = 'test.txt'