Skip to content

Commit

Permalink
Typing tweaks to dask#8239
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Oct 9, 2023
1 parent 275db75 commit 3dbe425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions distributed/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def port(self):
def identity(self) -> dict[str, str]:
return {"type": type(self).__name__, "id": self.id}

def _to_dict(self, *, exclude: Container[str] = ()) -> dict:
def _to_dict(self, *, exclude: Container[str] = ()) -> dict[str, Any]:
"""Dictionary representation for debugging purposes.
Not type stable and not intended for roundtrips.
Expand All @@ -831,8 +831,7 @@ def _to_dict(self, *, exclude: Container[str] = ()) -> dict:
Client.dump_cluster_state
distributed.utils.recursive_to_dict
"""
info: dict = {}
info.update(self.identity())
info: dict[str, Any] = self.identity()
extra = {
"address": self.address,
"status": self.status.name,
Expand Down Expand Up @@ -1012,7 +1011,7 @@ async def _handle_comm(self, comm: Comm) -> None:
)

async def handle_stream(
self, comm: Comm, extra: dict[str, str] | None = None
self, comm: Comm, extra: dict[str, Any] | None = None
) -> None:
extra = extra or {}
logger.info("Starting established connection to %s", comm.peer_address)
Expand Down
1 change: 0 additions & 1 deletion distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,6 @@ async def gather(self, who_has: dict[Key, list[str]]) -> dict[Key, object]:
else:
return {"status": "OK"}

# FIXME: Improve typing
def get_monitor_info(self, recent: bool = False, start: int = 0) -> dict[str, Any]:
result = dict(
range_query=(
Expand Down

0 comments on commit 3dbe425

Please sign in to comment.