diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index a866615f71ae588542d2f4394cdb41cd24a9a9c0..7af4077721363cf05e65690bf0434c84ae83ba5b 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -633,7 +633,9 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
         except KeyError:
             pass
 
-        res_deferred = ObservableDeferred(self.on_POST(request, room_id, membership_action, txn_id))
+        res_deferred = ObservableDeferred(
+            self.on_POST(request, room_id, membership_action, txn_id)
+        )
         self.txns.store_client_transaction(request, txn_id, res_deferred)
         response = yield res_deferred.observe()
         defer.returnValue(response)