diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-01-13 08:49:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 13:49:28 +0000 |
commit | 10a88ba91cb16ccf757984f0a7d41ddf8b4dc07f (patch) | |
tree | 1b97b98f60f33e690e9dcc4156ebafdd2617fe26 /synapse/storage/state.py | |
parent | Fix typo in demo docs: differnt (#11735) (diff) | |
download | synapse-10a88ba91cb16ccf757984f0a7d41ddf8b4dc07f.tar.xz |
Use auto_attribs/native type hints for attrs classes. (#11692)
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index b5ba1560d1..df8b2f1088 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -45,7 +45,7 @@ logger = logging.getLogger(__name__) T = TypeVar("T") -@attr.s(slots=True, frozen=True) +@attr.s(slots=True, frozen=True, auto_attribs=True) class StateFilter: """A filter used when querying for state. @@ -58,8 +58,8 @@ class StateFilter: appear in `types`. """ - types = attr.ib(type="frozendict[str, Optional[FrozenSet[str]]]") - include_others = attr.ib(default=False, type=bool) + types: "frozendict[str, Optional[FrozenSet[str]]]" + include_others: bool = False def __attrs_post_init__(self): # If `include_others` is set we canonicalise the filter by removing |