mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-30 15:44:05 +01:00
pep8
This commit is contained in:
parent
ab1bc9bf5f
commit
81a5e0073c
2 changed files with 5 additions and 3 deletions
|
@ -119,7 +119,7 @@ class BulkPushRuleEvaluator(object):
|
|||
# fastpath: if there's a power level event, that's all we need, and
|
||||
# not having a power level event is an extreme edge case
|
||||
pl_event = yield self.store.get_event(pl_event_id)
|
||||
auth_events = { POWER_KEY: pl_event }
|
||||
auth_events = {POWER_KEY: pl_event}
|
||||
else:
|
||||
auth_events_ids = yield self.auth.compute_auth_events(
|
||||
event, context.prev_state_ids, for_verification=False,
|
||||
|
@ -150,7 +150,9 @@ class BulkPushRuleEvaluator(object):
|
|||
event, context
|
||||
)
|
||||
|
||||
(power_levels, sender_power_level) = yield self._get_power_levels_and_sender_level(event, context)
|
||||
(power_levels, sender_power_level) = (
|
||||
yield self._get_power_levels_and_sender_level(event, context)
|
||||
)
|
||||
|
||||
evaluator = PushRuleEvaluatorForEvent(
|
||||
event, len(room_members), sender_power_level, power_levels,
|
||||
|
|
|
@ -41,7 +41,7 @@ def _sender_notification_permission(ev, condition, sender_power_level, power_lev
|
|||
notif_levels = power_levels.get('notifications', {})
|
||||
room_notif_level = notif_levels.get(notif_level_key, 50)
|
||||
|
||||
return sender_power_level >= room_notif_level;
|
||||
return sender_power_level >= room_notif_level
|
||||
|
||||
|
||||
def _test_ineq_condition(condition, number):
|
||||
|
|
Loading…
Reference in a new issue