mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:44:49 -04:00
Enable mypy checking for unreachable code and fix instances. (#8432)
This commit is contained in:
parent
c1ef579b63
commit
4ff0201e62
17 changed files with 38 additions and 53 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
import logging
|
||||
import re
|
||||
from typing import Any, Dict, List, Pattern, Union
|
||||
from typing import Any, Dict, List, Optional, Pattern, Union
|
||||
|
||||
from synapse.events import EventBase
|
||||
from synapse.types import UserID
|
||||
|
@ -181,7 +181,7 @@ class PushRuleEvaluatorForEvent:
|
|||
|
||||
return r.search(body)
|
||||
|
||||
def _get_value(self, dotted_key: str) -> str:
|
||||
def _get_value(self, dotted_key: str) -> Optional[str]:
|
||||
return self._value_cache.get(dotted_key, None)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue