mypy: Amend upload-file example, to pass with strict-optional.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-12-22 10:20:30 -08:00 committed by showell
parent 9df922e7fa
commit 8b4e877546

View 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'