mypy: Specify Callable type parameters in test_helpers.py.

This commit is contained in:
neiljp (Neil Pilgrim)
2017-11-02 09:13:38 -07:00
committed by Tim Abbott
parent 952f034136
commit 792a580efb

View File

@@ -90,7 +90,7 @@ def stub_event_queue_user_events(event_queue_return, user_events_return):
@contextmanager @contextmanager
def simulated_queue_client(client): def simulated_queue_client(client):
# type: (Callable) -> Iterator[None] # type: (Callable[..., Any]) -> Iterator[None]
real_SimpleQueueClient = queue_processors.SimpleQueueClient real_SimpleQueueClient = queue_processors.SimpleQueueClient
queue_processors.SimpleQueueClient = client # type: ignore # https://github.com/JukkaL/mypy/issues/1152 queue_processors.SimpleQueueClient = client # type: ignore # https://github.com/JukkaL/mypy/issues/1152
yield yield
@@ -143,7 +143,7 @@ def queries_captured(include_savepoints=False):
queries = [] # type: List[Dict[str, Union[str, binary_type]]] queries = [] # type: List[Dict[str, Union[str, binary_type]]]
def wrapper_execute(self, action, sql, params=()): 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 = get_cache_backend(None)
cache.clear() cache.clear()
start = time.time() start = time.time()