diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index eb7351621b167d952547fbd527446ee997ab9b59..541a6b0e10420158f49c7dd29f6b1a41ebdcb941 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -114,7 +114,12 @@ class SyncRestServlet(RestServlet):
         logger.debug(
             "/sync: user=%r, timeout=%r, since=%r, "
             "set_presence=%r, filter_id=%r, device_id=%r",
-            user, timeout, since, set_presence, filter_id, device_id
+            user,
+            timeout,
+            since,
+            set_presence,
+            filter_id,
+            device_id,
         )
 
         request_key = (user, timeout, since, filter_id, full_state, device_id)
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index 13782d3120d8e5d1c6340900a647d5e6d8dbe2a1..094ebad7707c5b0fd59506e34a9d8f6590c652da 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -118,7 +118,9 @@ class PreviewUrlResource(DirectServeResource):
                 value = getattr(url_tuple, attrib)
                 logger.debug(
                     "Matching attrib '%s' with value '%s' against" " pattern '%s'",
-                    attrib, value, pattern
+                    attrib,
+                    value,
+                    pattern,
                 )
 
                 if value is None:
diff --git a/synapse/storage/data_stores/main/event_federation.py b/synapse/storage/data_stores/main/event_federation.py
index 60bcfb768a7d5931796cfd177cf3742ce9f26827..90bef0cd2c9ab2fb17b3d3263c346716cd700673 100644
--- a/synapse/storage/data_stores/main/event_federation.py
+++ b/synapse/storage/data_stores/main/event_federation.py
@@ -364,9 +364,7 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore, SQLBas
         )
 
     def _get_backfill_events(self, txn, room_id, event_list, limit):
-        logger.debug(
-            "_get_backfill_events: %s, %r, %s", room_id, event_list, limit
-        )
+        logger.debug("_get_backfill_events: %s, %r, %s", room_id, event_list, limit)
 
         event_results = set()