diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-03-10 18:15:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 18:15:56 +0000 |
commit | a7a379006651ea219c2618c0a47e8f4053a9e769 (patch) | |
tree | 69e7b5a439c4304e52dc1170dd74ee80f3053843 /synapse/storage/databases/main | |
parent | Fix the auth provider on the logins metric (#9573) (diff) | |
download | synapse-a7a379006651ea219c2618c0a47e8f4053a9e769.tar.xz |
Convert Requester to attrs (#9586)
... because namedtuples suck Fix up a couple of other annotations to keep mypy happy.
Diffstat (limited to 'synapse/storage/databases/main')
-rw-r--r-- | synapse/storage/databases/main/registration.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py index 61a7556e56..eba66ff352 100644 --- a/synapse/storage/databases/main/registration.py +++ b/synapse/storage/databases/main/registration.py @@ -16,7 +16,7 @@ # limitations under the License. import logging import re -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union import attr @@ -1510,7 +1510,7 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore): async def user_delete_access_tokens( self, user_id: str, - except_token_id: Optional[str] = None, + except_token_id: Optional[int] = None, device_id: Optional[str] = None, ) -> List[Tuple[str, int, Optional[str]]]: """ @@ -1533,7 +1533,7 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore): items = keyvalues.items() where_clause = " AND ".join(k + " = ?" for k, _ in items) - values = [v for _, v in items] + values = [v for _, v in items] # type: List[Union[str, int]] if except_token_id: where_clause += " AND id != ?" values.append(except_token_id) |