From 792a580efb698a159bafbb91331b0928c583ea67 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Thu, 2 Nov 2017 09:13:38 -0700 Subject: [PATCH] mypy: Specify Callable type parameters in test_helpers.py. --- zerver/lib/test_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.py index 6e8b56f678..5822cda68b 100644 --- a/zerver/lib/test_helpers.py +++ b/zerver/lib/test_helpers.py @@ -90,7 +90,7 @@ def stub_event_queue_user_events(event_queue_return, user_events_return): @contextmanager def simulated_queue_client(client): - # type: (Callable) -> Iterator[None] + # type: (Callable[..., Any]) -> Iterator[None] real_SimpleQueueClient = queue_processors.SimpleQueueClient queue_processors.SimpleQueueClient = client # type: ignore # https://github.com/JukkaL/mypy/issues/1152 yield @@ -143,7 +143,7 @@ def queries_captured(include_savepoints=False): queries = [] # type: List[Dict[str, Union[str, binary_type]]] def wrapper_execute(self, action, sql, params=()): - # type: (TimeTrackingCursor, Callable, NonBinaryStr, Iterable[Any]) -> None + # type: (TimeTrackingCursor, Callable[[NonBinaryStr, Iterable[Any]], None], NonBinaryStr, Iterable[Any]) -> None cache = get_cache_backend(None) cache.clear() start = time.time()