summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-03-29 11:41:19 +0100
committerGitHub <noreply@github.com>2022-03-29 10:41:19 +0000
commita2b00a44865ff11810c5302e33c1c61ce21a030e (patch)
treed16f0f5378588b3fb2c4584b00f271219255e2c1 /synapse/util
parentRemove unused `auth_event_ids` argument plumbing (#12304) (diff)
downloadsynapse-a2b00a44865ff11810c5302e33c1c61ce21a030e.tar.xz
Bump `black` and `click` versions (#12320)
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/patch_inline_callbacks.py17
-rw-r--r--synapse/util/retryutils.py2
2 files changed, 11 insertions, 8 deletions
diff --git a/synapse/util/patch_inline_callbacks.py b/synapse/util/patch_inline_callbacks.py
index 6d4b0b7c5a..dace68666c 100644
--- a/synapse/util/patch_inline_callbacks.py
+++ b/synapse/util/patch_inline_callbacks.py
@@ -217,13 +217,16 @@ def _check_yield_points(
                 # We don't raise here as its perfectly valid for contexts to
                 # change in a function, as long as it sets the correct context
                 # on resolving (which is checked separately).
-                err = "%s changed context from %s to %s, happened between lines %d and %d in %s" % (
-                    frame.f_code.co_name,
-                    expected_context,
-                    current_context(),
-                    last_yield_line_no,
-                    frame.f_lineno,
-                    frame.f_code.co_filename,
+                err = (
+                    "%s changed context from %s to %s, happened between lines %d and %d in %s"
+                    % (
+                        frame.f_code.co_name,
+                        expected_context,
+                        current_context(),
+                        last_yield_line_no,
+                        frame.f_lineno,
+                        frame.f_code.co_filename,
+                    )
                 )
                 changes.append(err)
 
diff --git a/synapse/util/retryutils.py b/synapse/util/retryutils.py
index 648d9a95a7..d81f2527d7 100644
--- a/synapse/util/retryutils.py
+++ b/synapse/util/retryutils.py
@@ -30,7 +30,7 @@ MIN_RETRY_INTERVAL = 10 * 60 * 1000
 RETRY_MULTIPLIER = 5
 
 # a cap on the backoff. (Essentially none)
-MAX_RETRY_INTERVAL = 2 ** 62
+MAX_RETRY_INTERVAL = 2**62
 
 
 class NotRetryingDestination(Exception):