Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Makait <[email protected]>
  • Loading branch information
crusaderky and hendrikmakait authored Mar 21, 2024
1 parent 0395cfd commit 7ad6443
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3652,7 +3652,7 @@ async def _restart_workers(
workers: list[str],
timeout: str | int | float | NoDefault,
raise_for_error: bool,
) -> dict[str, Literal["OK", "timed out"]]:
) -> dict[str, Literal["OK", "removed", "timed out"]]:
if timeout is no_default:
timeout = self._timeout * 4
timeout = parse_timedelta(cast("str|int|float", timeout), "s")
Expand All @@ -3662,7 +3662,7 @@ async def _restart_workers(
worker_addrs = [name_to_addr.get(w, w) for w in workers]

out: dict[
str, Literal["OK", "timed out"]
str, Literal["OK", "removed", "timed out"]
] = await self.scheduler.restart_workers(
workers=worker_addrs,
timeout=timeout,
Expand Down Expand Up @@ -3701,7 +3701,7 @@ def restart_workers(
Returns
-------
dict[str, "OK" | "timed out"]
dict[str, "OK" | "removed" | "timed out"]
Mapping of worker and restart status, the keys will match the original
values passed in via ``workers``.
Expand Down
2 changes: 1 addition & 1 deletion distributed/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,7 @@ def freeze_batched_send(bcomm: BatchedSend) -> Iterator[LockedComm]:
bcomm.comm = orig_comm


class BlockedStartNanny(Nanny):
class BlockedInstantiateNanny(Nanny):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.in_instantiate = asyncio.Event()
Expand Down

0 comments on commit 7ad6443

Please sign in to comment.