Unverified Commit 3dcb36ec authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] [dask] fix mypy error about worker_addresses (#4851)

parent f7e39388
......@@ -349,7 +349,7 @@ def _split_to_parts(data: _DaskCollection, is_matrix: bool) -> List[_DaskPart]:
return parts
def _machines_to_worker_map(machines: str, worker_addresses: List[str]) -> Dict[str, int]:
def _machines_to_worker_map(machines: str, worker_addresses: Iterable[str]) -> Dict[str, int]:
"""Create a worker_map from machines list.
Given ``machines`` and a list of Dask worker addresses, return a mapping where the keys are
......@@ -360,7 +360,7 @@ def _machines_to_worker_map(machines: str, worker_addresses: List[str]) -> Dict[
machines : str
A comma-delimited list of workers, of the form ``ip1:port,ip2:port``.
worker_addresses : list of str
A list of Dask worker addresses, of the form ``{protocol}{hostname}:{port}``, where ``port`` is the port Dask's scheduler uses to talk to that worker.
An iterable of Dask worker addresses, of the form ``{protocol}{hostname}:{port}``, where ``port`` is the port Dask's scheduler uses to talk to that worker.
Returns
-------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment