summary refs log tree commit diff
path: root/synapse/rest/admin
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-13 16:46:44 +0000
committerGitHub <noreply@github.com>2024-03-13 16:46:44 +0000
commit1e68b56a623a0d7f98106482bfed223c22193050 (patch)
tree27eeaad00c340cfcc9c4abcf67ac2ff10472a09f /synapse/rest/admin
parentRaise poetry-core version cap to 1.9.0 (#16986) (diff)
downloadsynapse-1e68b56a623a0d7f98106482bfed223c22193050.tar.xz
Bump black from 23.10.1 to 24.2.0 (#16936)
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r--synapse/rest/admin/__init__.py10
-rw-r--r--synapse/rest/admin/users.py14
2 files changed, 14 insertions, 10 deletions
diff --git a/synapse/rest/admin/__init__.py b/synapse/rest/admin/__init__.py
index 07e0fb71f2..6da1d79168 100644
--- a/synapse/rest/admin/__init__.py
+++ b/synapse/rest/admin/__init__.py
@@ -237,10 +237,12 @@ class PurgeHistoryStatusRestServlet(RestServlet):
             raise NotFoundError("purge id '%s' not found" % purge_id)
 
         result: JsonDict = {
-            "status": purge_task.status
-            if purge_task.status == TaskStatus.COMPLETE
-            or purge_task.status == TaskStatus.FAILED
-            else "active",
+            "status": (
+                purge_task.status
+                if purge_task.status == TaskStatus.COMPLETE
+                or purge_task.status == TaskStatus.FAILED
+                else "active"
+            ),
         }
         if purge_task.error:
             result["error"] = purge_task.error
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index a9645e4af7..4e34e46512 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -1184,12 +1184,14 @@ class RateLimitRestServlet(RestServlet):
             # convert `null` to `0` for consistency
             # both values do the same in retelimit handler
             ret = {
-                "messages_per_second": 0
-                if ratelimit.messages_per_second is None
-                else ratelimit.messages_per_second,
-                "burst_count": 0
-                if ratelimit.burst_count is None
-                else ratelimit.burst_count,
+                "messages_per_second": (
+                    0
+                    if ratelimit.messages_per_second is None
+                    else ratelimit.messages_per_second
+                ),
+                "burst_count": (
+                    0 if ratelimit.burst_count is None else ratelimit.burst_count
+                ),
             }
         else:
             ret = {}