Closed PeterJCLaw closed 1 year ago
An alternative to this might be to just require that a queue is passed to the CachedState
class, rather than letting it be a parameter with a None
default. (And then removing these conditional checks.) All current callsites pass a value anyway, so there doesn't seem to be much benefit to this being optional.
Rather than being emptiness checks (as might otherwise be reasonably assumed given that a Queue is logically a collection).