mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 11:35:03 -04:00
Fix new flake8 errors (#7470)
This commit is contained in:
parent
8c8858e124
commit
1a1da60ad2
7 changed files with 19 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue