disallow-untyped-defs for synapse.push (#11023)

This commit is contained in:
David Robertson 2021-10-11 17:42:10 +01:00 committed by GitHub
parent 5e29d417fc
commit e0f11ae4a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 10 deletions

View file

@ -14,7 +14,7 @@
# limitations under the License.
import abc
import logging
from typing import List, Tuple, Union
from typing import Dict, List, Tuple, Union
from synapse.api.errors import NotFoundError, StoreError
from synapse.push.baserules import list_with_base_rules
@ -139,7 +139,7 @@ class PushRulesWorkerStore(
return _load_rules(rows, enabled_map, use_new_defaults)
@cached(max_entries=5000)
async def get_push_rules_enabled_for_user(self, user_id):
async def get_push_rules_enabled_for_user(self, user_id) -> Dict[str, bool]:
results = await self.db_pool.simple_select_list(
table="push_rules_enable",
keyvalues={"user_name": user_id},