Add missing type hints for tests.events. (#14904)

This commit is contained in:
Patrick Cloke 2023-01-25 15:14:03 -05:00 committed by GitHub
parent 8bc5d1406c
commit 3c3ba31507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 91 additions and 64 deletions

View file

@ -605,10 +605,11 @@ class EventClientSerializer:
_PowerLevel = Union[str, int]
PowerLevelsContent = Mapping[str, Union[_PowerLevel, Mapping[str, _PowerLevel]]]
def copy_and_fixup_power_levels_contents(
old_power_levels: Mapping[str, Union[_PowerLevel, Mapping[str, _PowerLevel]]]
old_power_levels: PowerLevelsContent,
) -> Dict[str, Union[int, Dict[str, int]]]:
"""Copy the content of a power_levels event, unfreezing frozendicts along the way.