Enable convenient typing of LocalSite-or-ALL parameters.
Review Request #13144 — Created July 13, 2023 and submitted
Review Board 5 introduced a
LocalSite.ALLvalue, which could be used
to query state without considering aLocalSitevalue (as opposed to a
Nonevalue for the global site). This was a bit hard to type
correctly, and we ran the risk of different blocks of code attempting
their own typing.This change introduces an
AnyOrAllLocalSitestype, which supports a
LocalSiteinstance,None, orALL.To make this work,
ALLneeded to be converted from a singleton object
to a value supported inLiteral. The safest approach was to use an
enum (which won't unintentionally cast to a string or integer in a
query). So we now have a private enum with only anALLvalue.
All unit tests pass.
| Summary | ID |
|---|---|
| 6b30c79b3751319859b45defba9002ad47e33abd |