diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2021-03-03 14:09:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 08:09:39 -0500 |
commit | d790d0d314c64c6c03ee88e74853a59e2781d6ae (patch) | |
tree | 006400bb53df9b37786c6273a9910cac2079b0de /synapse/storage/databases/main/__init__.py | |
parent | Bump the mypy and mypy-zope versions. (#9529) (diff) | |
download | synapse-d790d0d314c64c6c03ee88e74853a59e2781d6ae.tar.xz |
Add type hints to user admin API. (#9521)
Diffstat (limited to 'synapse/storage/databases/main/__init__.py')
-rw-r--r-- | synapse/storage/databases/main/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/__init__.py b/synapse/storage/databases/main/__init__.py index 70b49854cf..1d44c3aa2c 100644 --- a/synapse/storage/databases/main/__init__.py +++ b/synapse/storage/databases/main/__init__.py @@ -16,7 +16,7 @@ # limitations under the License. import logging -from typing import Any, Dict, List, Optional, Tuple +from typing import List, Optional, Tuple from synapse.api.constants import PresenceState from synapse.config.homeserver import HomeServerConfig @@ -27,7 +27,7 @@ from synapse.storage.util.id_generators import ( MultiWriterIdGenerator, StreamIdGenerator, ) -from synapse.types import get_domain_from_id +from synapse.types import JsonDict, get_domain_from_id from synapse.util.caches.stream_change_cache import StreamChangeCache from .account_data import AccountDataStore @@ -264,7 +264,7 @@ class DataStore( return [UserPresenceState(**row) for row in rows] - async def get_users(self) -> List[Dict[str, Any]]: + async def get_users(self) -> List[JsonDict]: """Function to retrieve a list of users in users table. Returns: @@ -292,7 +292,7 @@ class DataStore( name: Optional[str] = None, guests: bool = True, deactivated: bool = False, - ) -> Tuple[List[Dict[str, Any]], int]: + ) -> Tuple[List[JsonDict], int]: """Function to retrieve a paginated list of users from users list. This will return a json list of users and the total number of users matching the filter criteria. @@ -353,7 +353,7 @@ class DataStore( "get_users_paginate_txn", get_users_paginate_txn ) - async def search_users(self, term: str) -> Optional[List[Dict[str, Any]]]: + async def search_users(self, term: str) -> Optional[List[JsonDict]]: """Function to search users list for one or more users with the matched term. |