summary refs log tree commit diff
path: root/synapse/storage/engines/postgres.py
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/postgres.py
parentTweaks (diff)
downloadsynapse-29492b7e8580448b51d05b35684f9d6741872ba2.tar.xz
Lint.
Diffstat (limited to 'synapse/storage/engines/postgres.py')
-rw-r--r--synapse/storage/engines/postgres.py10
1 files changed, 8 insertions, 2 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()