Fix typos and whitespace in `worker.py`
@@ -252,7 +252,7 @@ class Worker(ServerNode):
$ dask-worker --help
- The rest of this docstring is about the internal state the the worker uses
+ The rest of this docstring is about the internal state that the worker uses
to manage and track internal computations.
**State**
@@ -361,7 +361,7 @@ class Worker(ServerNode):
memory_target_fraction: float or False
Fraction of memory to try to stay beneath
(default: read from config key distributed.worker.memory.target)
- memory_spill_fraction: float or false
+ memory_spill_fraction: float or False
Fraction of memory at which we start spilling to disk
(default: read from config key distributed.worker.memory.spill)
memory_pause_fraction: float or False
@@ -1501,7 +1501,7 @@ class Worker(ServerNode):
for c in Worker._initialized_clients:
# Regardless of what the client was initialized with
# we'll require the result as a future. This is
- # necessary since the heursitics of asynchronous are not
+ # necessary since the heuristics of asynchronous are not
# reliable and we might deadlock here
c._asynchronous = True
if c.asynchronous:
@@ -2272,7 +2272,7 @@ class Worker(ServerNode):
executing -> cancelled -> resumed(fetch)
- depending on the origin. Equally, only `fetch`, `waiting` or `released`
+ depending on the origin. Equally, only `fetch`, `waiting`, or `released`
are allowed output states.
See also `transition_resumed_waiting`
@@ -2290,7 +2290,7 @@ class Worker(ServerNode):
# If we're not done, yet, just remember where we want to be next
ts._next = finish
else:
- # Flight/executing finished unsuccesfully, i.e. not in memory
+ # Flight/executing finished unsuccessfully, i.e. not in memory
assert finish != "memory"
next_state = ts._next
assert next_state in {"waiting", "fetch"}, next_state
@@ -2307,17 +2307,13 @@ class Worker(ServerNode):
def transition_resumed_fetch(
self, ts: TaskState, *, stimulus_id: str
) -> RecsInstrs:
- """
- See Worker._transition_from_resumed
- """
+ """See Worker._transition_from_resumed"""
return self._transition_from_resumed(ts, "fetch", stimulus_id=stimulus_id)
def transition_resumed_missing(
self, ts: TaskState, *, stimulus_id: str
) -> RecsInstrs:
- """
- See Worker._transition_from_resumed
- """
+ """See Worker._transition_from_resumed"""
return self._transition_from_resumed(ts, "missing", stimulus_id=stimulus_id)
def transition_resumed_released(
@@ -2333,9 +2329,7 @@ class Worker(ServerNode):
def transition_resumed_waiting(
self, ts: TaskState, *, stimulus_id: str
) -> RecsInstrs:
- """
- See Worker._transition_from_resumed
- """
+ """See Worker._transition_from_resumed"""
return self._transition_from_resumed(ts, "waiting", stimulus_id=stimulus_id)
def transition_cancelled_fetch(
