You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously these methods all had to account for the potential that they
could be returning the uninitialized status, which was `None`. Default
instead to `Queued` which means that the job is ready but not yet
dispatched.
In reality this `status` variable is a bit messy; it is defined on the
base class as `None` and only set in `_post_finish` with the given
status. It is only used by `_post_finish` itself (after being set) and is
otherwise only directly used/returned by the `local`, `lsf` and `nc`
launchers, each of which do not set the value. So:
- It initializes as `None`.
- The `local` and `nc` launcher only use it after invoking
`post_finish`, so it is definitely a status then.
- The `lsf` launcher only returns the status if it has a not-None
status, i.e. if it already finished.
So in all of these cases, `status` is only used after being set, it is
just being initialized as `None` and the type propagates. Rather than
perform typing casts or checks everywhere, lets just change this default
value to be the `Queued` status. A larger refactor is likely needed in
the future
Signed-off-by: Alex Jones <[email protected]>
0 commit comments