mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-29 15:37:11 -04:00
Fix new flake8 errors (#7489)
This is a cherry-pick of 1a1da60ad2
(#7470)
to the release-v1.13.0 branch.
This commit is contained in:
parent
fa4af2c3af
commit
edd3b0747c
7 changed files with 19 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue