From 78041a584699c56131e78b4bd2231771c5283270 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 8 Dec 2017 07:59:13 -0800 Subject: [PATCH] mypy: Use more specific type for instrument_url wrapper. --- zerver/lib/test_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.py index 65861fd89b..30cee255ea 100644 --- a/zerver/lib/test_helpers.py +++ b/zerver/lib/test_helpers.py @@ -48,6 +48,9 @@ from zerver.models import ( from zerver.lib.request import JsonableError +if False: + from zerver.lib.test_case import ZulipTestCase + import collections import base64 import mock @@ -299,7 +302,7 @@ def instrument_url(f: UrlFuncT) -> UrlFuncT: if not INSTRUMENTING: # nocoverage -- option is always enabled; should we remove? return f else: - def wrapper(self: Any, url: Text, info: Dict[str, Any]={}, + def wrapper(self: 'ZulipTestCase', url: Text, info: Dict[str, Any]={}, **kwargs: Any) -> HttpResponse: start = time.time() result = f(self, url, info, **kwargs)