This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 2 files changed +8
-7
lines changed
synapse/storage/databases/main
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change
1
+ Use `auto_attribs` on the `attrs` class `RefreshTokenLookupResult`.
Original file line number Diff line number Diff line change @@ -84,26 +84,26 @@ def _default_token_owner(self):
84
84
return self .user_id
85
85
86
86
87
- @attr .s (frozen = True , slots = True )
87
+ @attr .s (auto_attribs = True , frozen = True , slots = True )
88
88
class RefreshTokenLookupResult :
89
89
"""Result of looking up a refresh token."""
90
90
91
- user_id = attr . ib ( type = str )
91
+ user_id : str
92
92
"""The user this token belongs to."""
93
93
94
- device_id = attr . ib ( type = str )
94
+ device_id : str
95
95
"""The device associated with this refresh token."""
96
96
97
- token_id = attr . ib ( type = int )
97
+ token_id : int
98
98
"""The ID of this refresh token."""
99
99
100
- next_token_id = attr . ib ( type = Optional [int ])
100
+ next_token_id : Optional [int ]
101
101
"""The ID of the refresh token which replaced this one."""
102
102
103
- has_next_refresh_token_been_refreshed = attr . ib ( type = bool )
103
+ has_next_refresh_token_been_refreshed : bool
104
104
"""True if the next refresh token was used for another refresh."""
105
105
106
- has_next_access_token_been_used = attr . ib ( type = bool )
106
+ has_next_access_token_been_used : bool
107
107
"""True if the next access token was already used at least once."""
108
108
109
109
You can’t perform that action at this time.
0 commit comments