mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-03 05:06:10 -04:00
Upgrade mypy to version 0.931 (#12030)
Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
This commit is contained in:
parent
eb609c65d0
commit
e6acd3cf4f
9 changed files with 33 additions and 19 deletions
|
@ -130,7 +130,9 @@ def make_base_prepend_rules(
|
|||
return rules
|
||||
|
||||
|
||||
BASE_APPEND_CONTENT_RULES = [
|
||||
# We have to annotate these types, otherwise mypy infers them as
|
||||
# `List[Dict[str, Sequence[Collection[str]]]]`.
|
||||
BASE_APPEND_CONTENT_RULES: List[Dict[str, Any]] = [
|
||||
{
|
||||
"rule_id": "global/content/.m.rule.contains_user_name",
|
||||
"conditions": [
|
||||
|
@ -149,7 +151,7 @@ BASE_APPEND_CONTENT_RULES = [
|
|||
]
|
||||
|
||||
|
||||
BASE_PREPEND_OVERRIDE_RULES = [
|
||||
BASE_PREPEND_OVERRIDE_RULES: List[Dict[str, Any]] = [
|
||||
{
|
||||
"rule_id": "global/override/.m.rule.master",
|
||||
"enabled": False,
|
||||
|
@ -159,7 +161,7 @@ BASE_PREPEND_OVERRIDE_RULES = [
|
|||
]
|
||||
|
||||
|
||||
BASE_APPEND_OVERRIDE_RULES = [
|
||||
BASE_APPEND_OVERRIDE_RULES: List[Dict[str, Any]] = [
|
||||
{
|
||||
"rule_id": "global/override/.m.rule.suppress_notices",
|
||||
"conditions": [
|
||||
|
@ -278,7 +280,7 @@ BASE_APPEND_OVERRIDE_RULES = [
|
|||
]
|
||||
|
||||
|
||||
BASE_APPEND_UNDERRIDE_RULES = [
|
||||
BASE_APPEND_UNDERRIDE_RULES: List[Dict[str, Any]] = [
|
||||
{
|
||||
"rule_id": "global/underride/.m.rule.call",
|
||||
"conditions": [
|
||||
|
|
|
@ -325,7 +325,7 @@ class HttpPusher(Pusher):
|
|||
# This was checked in the __init__, but mypy doesn't seem to know that.
|
||||
assert self.data is not None
|
||||
if self.data.get("format") == "event_id_only":
|
||||
d = {
|
||||
d: Dict[str, Any] = {
|
||||
"notification": {
|
||||
"event_id": event.event_id,
|
||||
"room_id": event.room_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue