From c679c180f580c899d9a808af5bdb4514d71699b9 Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Tue, 5 Jul 2016 07:43:51 +0530 Subject: [PATCH] enqueue_file.py: Add type hint for mypy. --- tools/run-mypy | 1 - zerver/management/commands/enqueue_file.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/run-mypy b/tools/run-mypy index 5364312a54..ba2eba94f2 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -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 diff --git a/zerver/management/commands/enqueue_file.py b/zerver/management/commands/enqueue_file.py index 7d6bcc8669..f6657f3128 100644 --- a/zerver/management/commands/enqueue_file.py +++ b/zerver/management/commands/enqueue_file.py @@ -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)