• 
      

    Fix the typing for LocalSite.ALL to be more specific.

    Review Request #13996 — Created June 24, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.x

    Reviewers

    LocalSite.ALL was typed as a Final[_LocalSiteConstants], which
    worked fine in some cases, but didn't always match correctly. This is
    because, depending on typing, passing a LocalSite.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 a Final[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.

    Commits

    Files