Fix the typing for LocalSite.ALL to be more specific.
Review Request #13996 — Created June 24, 2024 and submitted — Latest diff uploaded
LocalSite.ALLwas typed as aFinal[_LocalSiteConstants], which
worked fine in some cases, but didn't always match correctly. This is
because, depending on typing, passing aLocalSite.ALLas a
_LocalSiteConstants.ALLcould be seen as passing a
_LocalSiteConstantsas a_LocalSiteConstants.ALL, which clearly
doesn't match.Now,
LocalSite.ALLis aFinal[Literal[_LocalSiteConstants.ALL]],
which helps it always match anything accepting_LocalSiteConstants.ALL
as a type.
Tested this against some in-progress code that was failing to
type correctly.Checked existing usage of
LocalSite.ALLbeing passed as an
AnyOrAllLocalSites, and found that it was still working as
expected.