diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-05-13 08:24:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 08:24:50 -0400 |
commit | edd3b0747cc651d224fc1bf81ae7fbd6a25a2ea5 (patch) | |
tree | ba9843033806aeb0849c8e2b99ed9edb5fd71213 /synapse/storage | |
parent | Don't UPGRADE database rows (diff) | |
download | synapse-edd3b0747cc651d224fc1bf81ae7fbd6a25a2ea5.tar.xz |
Fix new flake8 errors (#7489)
This is a cherry-pick of 1a1da60ad2c9172fe487cd38a164b39df60f4cb5 (#7470) to the release-v1.13.0 branch.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/database.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py index a7cd97b0b0..50f475bfd3 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -212,9 +212,9 @@ class LoggingTransaction: def executemany(self, sql: str, *args: Any): self._do_execute(self.txn.executemany, sql, *args) - def _make_sql_one_line(self, sql): + def _make_sql_one_line(self, sql: str) -> str: "Strip newlines out of SQL so that the loggers in the DB are on one line" - return " ".join(l.strip() for l in sql.splitlines() if l.strip()) + return " ".join(line.strip() for line in sql.splitlines() if line.strip()) def _do_execute(self, func, sql, *args): sql = self._make_sql_one_line(sql) |