mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:14:49 -04:00
Reduce the number of "untyped defs" (#12716)
This commit is contained in:
parent
de1e599b9d
commit
17e1eb7749
16 changed files with 142 additions and 69 deletions
|
@ -62,7 +62,7 @@ class StateFilter:
|
|||
types: "frozendict[str, Optional[FrozenSet[str]]]"
|
||||
include_others: bool = False
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
def __attrs_post_init__(self) -> None:
|
||||
# If `include_others` is set we canonicalise the filter by removing
|
||||
# wildcards from the types dictionary
|
||||
if self.include_others:
|
||||
|
@ -138,7 +138,9 @@ class StateFilter:
|
|||
)
|
||||
|
||||
@staticmethod
|
||||
def freeze(types: Mapping[str, Optional[Collection[str]]], include_others: bool):
|
||||
def freeze(
|
||||
types: Mapping[str, Optional[Collection[str]]], include_others: bool
|
||||
) -> "StateFilter":
|
||||
"""
|
||||
Returns a (frozen) StateFilter with the same contents as the parameters
|
||||
specified here, which can be made of mutable types.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue