diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2021-02-16 16:32:34 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 22:32:34 +0000 |
commit | 0a00b7ff14890987f09112a2ae696c61001e6cf1 (patch) | |
tree | e662b6da7679b47276d8a865e3dc9b531d1cd9bd /synapse/push/httppusher.py | |
parent | Fix OIDC gitiea redirect URL. (#9404) (diff) | |
download | synapse-0a00b7ff14890987f09112a2ae696c61001e6cf1.tar.xz |
Update black, and run auto formatting over the codebase (#9381)
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r-- | synapse/push/httppusher.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index e048b0d59e..b9d3da2e0a 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -176,8 +176,10 @@ class HttpPusher(Pusher): Never call this directly: use _process which will only allow this to run once per pusher. """ - unprocessed = await self.store.get_unread_push_actions_for_user_in_range_for_http( - self.user_id, self.last_stream_ordering, self.max_stream_ordering + unprocessed = ( + await self.store.get_unread_push_actions_for_user_in_range_for_http( + self.user_id, self.last_stream_ordering, self.max_stream_ordering + ) ) logger.info( @@ -204,12 +206,14 @@ class HttpPusher(Pusher): http_push_processed_counter.inc() self.backoff_delay = HttpPusher.INITIAL_BACKOFF_SEC self.last_stream_ordering = push_action["stream_ordering"] - pusher_still_exists = await self.store.update_pusher_last_stream_ordering_and_success( - self.app_id, - self.pushkey, - self.user_id, - self.last_stream_ordering, - self.clock.time_msec(), + pusher_still_exists = ( + await self.store.update_pusher_last_stream_ordering_and_success( + self.app_id, + self.pushkey, + self.user_id, + self.last_stream_ordering, + self.clock.time_msec(), + ) ) if not pusher_still_exists: # The pusher has been deleted while we were processing, so @@ -290,7 +294,8 @@ class HttpPusher(Pusher): # for sanity, we only remove the pushkey if it # was the one we actually sent... logger.warning( - ("Ignoring rejected pushkey %s because we didn't send it"), pk, + ("Ignoring rejected pushkey %s because we didn't send it"), + pk, ) else: logger.info("Pushkey %s was rejected: removing", pk) |