mypy: Use more specific type for instrument_url wrapper.

This commit is contained in:
Steve Howell 2017-12-08 07:59:13 -08:00 committed by Greg Price
parent aa37b50d1e
commit 78041a5846
1 changed files with 4 additions and 1 deletions

View File

@ -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)