Skip to content

Commit

Permalink
[python-package] [dask] fix mypy error about worker_addresses (#4851)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Dec 6, 2021
1 parent f7e3938 commit 3dcb36e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python-package/lightgbm/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
-------
Expand Down

0 comments on commit 3dcb36e

Please sign in to comment.