Fix the typing for LocalSite.ALL to be more specific.
Review Request #13996 — Created June 24, 2024 and submitted — Latest diff uploaded
LocalSite.ALL
was typed as aFinal[_LocalSiteConstants]
, which
worked fine in some cases, but didn't always match correctly. This is
because, depending on typing, passing aLocalSite.ALL
as a
_LocalSiteConstants.ALL
could be seen as passing a
_LocalSiteConstants
as a_LocalSiteConstants.ALL
, which clearly
doesn't match.Now,
LocalSite.ALL
is 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.ALL
being passed as an
AnyOrAllLocalSites
, and found that it was still working as
expected.