Apply ruff formatting to postgres adapter and tests.
PR Title Check / check-title (pull_request) Successful in 8s
Test Python Package / unit-tests (pull_request) Successful in 13s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 29s
Test Python Package / coverage-report (pull_request) Successful in 10s
PR Title Check / check-title (pull_request) Successful in 8s
Test Python Package / unit-tests (pull_request) Successful in 13s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 29s
Test Python Package / coverage-report (pull_request) Successful in 10s
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
63ee17d544
commit
1babb52d09
@@ -94,9 +94,7 @@ class PostgresAdapter(ConnectionAwareAdapter, TableRepositoryInterface):
|
||||
cursor.execute("SELECT 1")
|
||||
try:
|
||||
cursor.execute(
|
||||
sql.SQL("SELECT 1 FROM {} LIMIT 0").format(
|
||||
self._table_identifier()
|
||||
)
|
||||
sql.SQL("SELECT 1 FROM {} LIMIT 0").format(self._table_identifier())
|
||||
)
|
||||
except UndefinedTable as exc:
|
||||
raise ConnectionError(
|
||||
@@ -189,9 +187,7 @@ class PostgresAdapter(ConnectionAwareAdapter, TableRepositoryInterface):
|
||||
on_conflict = sql.SQL("DO UPDATE SET {}").format(update_assignments)
|
||||
else:
|
||||
on_conflict = sql.SQL("DO NOTHING")
|
||||
query = sql.SQL(
|
||||
"INSERT INTO {} ({}) VALUES ({}) ON CONFLICT ({}) {}"
|
||||
).format(
|
||||
query = sql.SQL("INSERT INTO {} ({}) VALUES ({}) ON CONFLICT ({}) {}").format(
|
||||
self._table_identifier(),
|
||||
column_list,
|
||||
placeholders,
|
||||
|
||||
Reference in New Issue
Block a user