Skip to content

Commit 8df6ead

Browse files
committed
better types
1 parent d16a5a1 commit 8df6ead

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

distributed/scheduler.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ class WorkerState:
502502
# Reference to scheduler task_groups
503503
scheduler_ref: weakref.ref[SchedulerState] | None
504504
task_prefix_count: defaultdict[str, int]
505-
_network_occ: float
505+
_network_occ: int
506506
_occupancy_cache: float | None
507507

508508
#: Keys that may need to be fetched to this worker, and the number of tasks that need them.
@@ -1715,7 +1715,7 @@ class SchedulerState:
17151715
transition_counter_max: int | Literal[False]
17161716

17171717
_task_prefix_count_global: defaultdict[str, int]
1718-
_network_occ_global: float
1718+
_network_occ_global: int
17191719
######################
17201720
# Cached configuration
17211721
######################
@@ -1784,7 +1784,7 @@ def __init__(
17841784
self.validate = validate
17851785
self.workers = workers
17861786
self._task_prefix_count_global = defaultdict(int)
1787-
self._network_occ_global = 0.0
1787+
self._network_occ_global = 0
17881788
self.running = {
17891789
ws for ws in self.workers.values() if ws.status == Status.running
17901790
}

0 commit comments

Comments
 (0)