mypy: Amend upload-file example, to pass with strict-optional.
This commit is contained in:
parent
9df922e7fa
commit
8b4e877546
|
@ -47,9 +47,8 @@ options = parser.parse_args()
|
||||||
|
|
||||||
client = zulip.init_from_options(options)
|
client = zulip.init_from_options(options)
|
||||||
|
|
||||||
file = None # type: IO[Any]
|
|
||||||
if options.file_path:
|
if options.file_path:
|
||||||
file = open(options.file_path, 'rb')
|
file = open(options.file_path, 'rb') # type: IO[Any]
|
||||||
else:
|
else:
|
||||||
file = StringIO('This is a test file.')
|
file = StringIO('This is a test file.')
|
||||||
file.name = 'test.txt'
|
file.name = 'test.txt'
|
||||||
|
|
Loading…
Reference in a new issue