Open zilto opened 1 week ago
OK, so:
_step
does return None.step
-- the other ones have specific conditions for hitting the point where it's none.(act, retval, state) = app.step() or (None, None, None)
. OTOH that type of code is just generally bad, so maybe this should just be fixed.
Currently,
Application.step()
gives a bunch of squiggly red lines when trying to unpack the return value.This is because
.step()
is annotated as follow, potentially returningNone
, which can't be unpacked(the return line of
._step()
also has red squiggly lines)Does
._step()
actually ever returnNone
? If yes, would it make sense to have it return(None, None, None)
instead?Having two potentially return values (the
tuple
orNone
) can be annoying to deal with if they have different "shapes". I'm guessing that directly unpacking the return value is common.