summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-05-13 08:24:50 -0400
committerGitHub <noreply@github.com>2020-05-13 08:24:50 -0400
commitedd3b0747cc651d224fc1bf81ae7fbd6a25a2ea5 (patch)
treeba9843033806aeb0849c8e2b99ed9edb5fd71213 /synapse/push/mailer.py
parentDon't UPGRADE database rows (diff)
downloadsynapse-edd3b0747cc651d224fc1bf81ae7fbd6a25a2ea5.tar.xz
Fix new flake8 errors (#7489)
This is a cherry-pick of 1a1da60ad2c9172fe487cd38a164b39df60f4cb5 (#7470)
to the release-v1.13.0 branch.
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 73580c1c6c..ab33abbeed 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -19,6 +19,7 @@ import logging
 import time
 from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
+from typing import Iterable, List, TypeVar
 
 from six.moves import urllib
 
@@ -41,6 +42,8 @@ from synapse.visibility import filter_events_for_client
 
 logger = logging.getLogger(__name__)
 
+T = TypeVar("T")
+
 
 MESSAGE_FROM_PERSON_IN_ROOM = (
     "You have a message on %(app)s from %(person)s in the %(room)s room..."
@@ -638,10 +641,10 @@ def safe_text(raw_text):
     )
 
 
-def deduped_ordered_list(l):
+def deduped_ordered_list(it: Iterable[T]) -> List[T]:
     seen = set()
     ret = []
-    for item in l:
+    for item in it:
         if item not in seen:
             seen.add(item)
             ret.append(item)