Skip to content

Commit

Permalink
Annotate decide_worker's return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Dec 9, 2020
1 parent 3d493a6 commit f8b8c14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4653,7 +4653,7 @@ def transition_no_worker_waiting(self, key):
pdb.set_trace()
raise

def decide_worker(self, ts: TaskState):
def decide_worker(self, ts: TaskState) -> WorkerState:
"""
Decide on a worker for task *ts*. Return a WorkerState.
"""
Expand Down Expand Up @@ -6082,7 +6082,9 @@ def adaptive_target(self, comm=None, target_duration=None):
return len(self.workers) - len(to_close)


def decide_worker(ts: TaskState, all_workers, valid_workers: set, objective):
def decide_worker(
ts: TaskState, all_workers, valid_workers: set, objective
) -> WorkerState:
"""
Decide which worker should take task *ts*.
Expand Down

0 comments on commit f8b8c14

Please sign in to comment.