pep8
This commit is contained in:
parent
937c407eef
commit
60f86fc876
|
@ -48,7 +48,7 @@ class EmailConfig(Config):
|
||||||
if (len(missing) > 0):
|
if (len(missing) > 0):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"email.enable_notifs is True but required keys are missing: %s" %
|
"email.enable_notifs is True but required keys are missing: %s" %
|
||||||
(", ".join(["email."+k for k in missing]),)
|
(", ".join(["email." + k for k in missing]),)
|
||||||
)
|
)
|
||||||
|
|
||||||
if config.get("public_baseurl") is None:
|
if config.get("public_baseurl") is None:
|
||||||
|
|
|
@ -62,7 +62,7 @@ ALLOWED_ATTRS = {
|
||||||
"img": ["src"],
|
"img": ["src"],
|
||||||
}
|
}
|
||||||
# When bleach release a version with this option, we can specify schemes
|
# When bleach release a version with this option, we can specify schemes
|
||||||
#ALLOWED_SCHEMES = ["http", "https", "ftp", "mailto"]
|
# ALLOWED_SCHEMES = ["http", "https", "ftp", "mailto"]
|
||||||
|
|
||||||
|
|
||||||
class Mailer(object):
|
class Mailer(object):
|
||||||
|
@ -283,7 +283,8 @@ class Mailer(object):
|
||||||
|
|
||||||
return MESSAGES_FROM_PERSON % (
|
return MESSAGES_FROM_PERSON % (
|
||||||
descriptor_from_member_events([
|
descriptor_from_member_events([
|
||||||
state_by_room[room_id][("m.room.member", s)] for s in sender_ids
|
state_by_room[room_id][("m.room.member", s)]
|
||||||
|
for s in sender_ids
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -346,11 +347,13 @@ def deduped_ordered_list(l):
|
||||||
ret.append(item)
|
ret.append(item)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def string_ordinal_total(s):
|
def string_ordinal_total(s):
|
||||||
tot = 0
|
tot = 0
|
||||||
for c in s:
|
for c in s:
|
||||||
tot += ord(c)
|
tot += ord(c)
|
||||||
return tot
|
return tot
|
||||||
|
|
||||||
|
|
||||||
def format_ts_filter(value, format):
|
def format_ts_filter(value, format):
|
||||||
return time.strftime(format, time.localtime(value / 1000))
|
return time.strftime(format, time.localtime(value / 1000))
|
||||||
|
|
Loading…
Reference in New Issue