From 0badbbf0e281bec39613924bd0e1756d549adc0c Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Tue, 31 Jan 2017 14:04:18 +0530 Subject: [PATCH] Type annotate a variable to prevent future errors. In zerver.tests.test_decorators.test_check_dict, the variable 'keys' has to be explicitly annotated to pass mypy 0.4.7. See https://github.com/python/mypy/issues/2777 for more info. --- zerver/tests/test_decorators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py index db0d05132d..6eb96c3810 100644 --- a/zerver/tests/test_decorators.py +++ b/zerver/tests/test_decorators.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import mock -from typing import Any, Iterable, Optional, Text +from typing import Any, Iterable, List, Optional, Text, Tuple from django.test import TestCase from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpRequest @@ -31,7 +31,7 @@ from zerver.decorator import ( return_success_on_head_request ) from zerver.lib.validator import ( - check_string, check_dict, check_bool, check_int, check_list + check_string, check_dict, check_bool, check_int, check_list, Validator ) from zerver.models import \ get_realm, get_user_profile_by_email, UserProfile, Client @@ -427,7 +427,7 @@ class ValidatorTestCase(TestCase): keys = [ ('names', check_list(check_string)), ('city', check_string), - ] + ] # type: List[Tuple[str, Validator]] x = { 'names': ['alice', 'bob'],