diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-07-21 09:47:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 09:47:56 -0400 |
commit | 5db118626bebb9ce3913758282787d47cd8f375e (patch) | |
tree | 9515e33f8e3a319f2e76ca88094654d946304979 /synapse/storage/databases/main | |
parent | Switch to `chunk` events so we can auth via power_levels (MSC2716) (#10432) (diff) | |
download | synapse-5db118626bebb9ce3913758282787d47cd8f375e.tar.xz |
Add a return type to parse_string. (#10438)
And set the required attribute in a few places which will error if a parameter is not provided.
Diffstat (limited to 'synapse/storage/databases/main')
-rw-r--r-- | synapse/storage/databases/main/__init__.py | 2 | ||||
-rw-r--r-- | synapse/storage/databases/main/room.py | 2 | ||||
-rw-r--r-- | synapse/storage/databases/main/stats.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/__init__.py b/synapse/storage/databases/main/__init__.py index a3fddea042..bacfbce4af 100644 --- a/synapse/storage/databases/main/__init__.py +++ b/synapse/storage/databases/main/__init__.py @@ -249,7 +249,7 @@ class DataStore( name: Optional[str] = None, guests: bool = True, deactivated: bool = False, - order_by: UserSortOrder = UserSortOrder.USER_ID.value, + order_by: str = UserSortOrder.USER_ID.value, direction: str = "f", ) -> Tuple[List[JsonDict], int]: """Function to retrieve a paginated list of users from diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 6ddafe5434..443e5f3315 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -363,7 +363,7 @@ class RoomWorkerStore(SQLBaseStore): self, start: int, limit: int, - order_by: RoomSortOrder, + order_by: str, reverse_order: bool, search_term: Optional[str], ) -> Tuple[List[Dict[str, Any]], int]: diff --git a/synapse/storage/databases/main/stats.py b/synapse/storage/databases/main/stats.py index 59d67c255b..0f9aa54ca9 100644 --- a/synapse/storage/databases/main/stats.py +++ b/synapse/storage/databases/main/stats.py @@ -647,7 +647,7 @@ class StatsStore(StateDeltasStore): limit: int, from_ts: Optional[int] = None, until_ts: Optional[int] = None, - order_by: Optional[UserSortOrder] = UserSortOrder.USER_ID.value, + order_by: Optional[str] = UserSortOrder.USER_ID.value, direction: Optional[str] = "f", search_term: Optional[str] = None, ) -> Tuple[List[JsonDict], Dict[str, int]]: |