enqueue_file.py: Add type hint for mypy.

This commit is contained in:
Eklavya Sharma 2016-07-05 07:43:51 +05:30 committed by Tim Abbott
parent 896c18a57b
commit c679c180f5
2 changed files with 2 additions and 3 deletions

View File

@ -41,7 +41,6 @@ exclude_py2 = []
exclude_py3 = """
zerver/lib/ccache.py
zerver/management/commands/enqueue_file.py
zerver/management/commands/rename_stream.py
zerver/management/commands/runtornado.py
zerver/tests/test_i18n.py

View File

@ -1,7 +1,7 @@
from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from typing import Any, IO
from argparse import ArgumentParser
from django.core.management.base import BaseCommand
@ -39,7 +39,7 @@ You can use "-" to represent stdin.
file_name = options['file_name']
if file_name == '-':
f = sys.stdin
f = sys.stdin # type: IO[str]
else:
f = open(file_name)