mirror of https://github.com/zulip/zulip.git
mypy: Use more specific type for instrument_url wrapper.
This commit is contained in:
parent
aa37b50d1e
commit
78041a5846
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue