summary refs log tree commit diff
path: root/synapse/storage/engines
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2023-09-29 13:44:29 -0400
committerPatrick Cloke <patrickc@matrix.org>2023-09-29 13:44:49 -0400
commit29492b7e8580448b51d05b35684f9d6741872ba2 (patch)
tree123b0b5d276113917ef00ac4539262f08e3ae5ee /synapse/storage/engines
parentTweaks (diff)
downloadsynapse-29492b7e8580448b51d05b35684f9d6741872ba2.tar.xz
Lint.
Diffstat (limited to 'synapse/storage/engines')
-rw-r--r--synapse/storage/engines/postgres.py10
-rw-r--r--synapse/storage/engines/psycopg.py4
-rw-r--r--synapse/storage/engines/psycopg2.py4
3 files changed, 10 insertions, 8 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py
index c28730c4ca..f357d876ce 100644
--- a/synapse/storage/engines/postgres.py
+++ b/synapse/storage/engines/postgres.py
@@ -33,7 +33,9 @@ if TYPE_CHECKING:
 logger = logging.getLogger(__name__)
 
 
-class PostgresEngine(BaseDatabaseEngine[ConnectionType, CursorType], metaclass=abc.ABCMeta):
+class PostgresEngine(
+    BaseDatabaseEngine[ConnectionType, CursorType], metaclass=abc.ABCMeta
+):
     isolation_level_map: Mapping[int, int]
     default_isolation_level: int
     OperationalError: Type[Exception]
@@ -168,7 +170,11 @@ class PostgresEngine(BaseDatabaseEngine[ConnectionType, CursorType], metaclass=a
             if self.__class__.__name__ == "Psycopg2Engine":
                 cursor.execute("SET statement_timeout TO ?", (self.statement_timeout,))
             else:
-                cursor.execute(sql.SQL("SET statement_timeout TO {}").format(self.statement_timeout))
+                cursor.execute(
+                    sql.SQL("SET statement_timeout TO {}").format(
+                        self.statement_timeout
+                    )
+                )
 
         cursor.close()
         db_conn.commit()
diff --git a/synapse/storage/engines/psycopg.py b/synapse/storage/engines/psycopg.py
index ddd745217f..f5d2bf8471 100644
--- a/synapse/storage/engines/psycopg.py
+++ b/synapse/storage/engines/psycopg.py
@@ -22,9 +22,7 @@ import psycopg.sql
 from twisted.enterprise.adbapi import Connection as TxConnection
 
 from synapse.storage.engines import PostgresEngine
-from synapse.storage.engines._base import (
-    IsolationLevel,
-)
+from synapse.storage.engines._base import IsolationLevel
 
 if TYPE_CHECKING:
     pass
diff --git a/synapse/storage/engines/psycopg2.py b/synapse/storage/engines/psycopg2.py
index 78b7a4c51f..5e57d8faf8 100644
--- a/synapse/storage/engines/psycopg2.py
+++ b/synapse/storage/engines/psycopg2.py
@@ -18,9 +18,7 @@ from typing import TYPE_CHECKING, Any, Mapping, Optional
 import psycopg2.extensions
 
 from synapse.storage.engines import PostgresEngine
-from synapse.storage.engines._base import (
-    IsolationLevel,
-)
+from synapse.storage.engines._base import IsolationLevel
 
 if TYPE_CHECKING:
     pass