You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/08/30 22:02:03 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #33859: Replace format() by f-string in tests
hussein-awala commented on code in PR #33859:
URL: https://github.com/apache/airflow/pull/33859#discussion_r1310877137
##########
tests/providers/postgres/hooks/test_postgres.py:
##########
@@ -429,8 +429,8 @@ def test_insert_rows_replace(self):
assert commit_count == self.conn.commit.call_count
sql = (
- "INSERT INTO {0} ({1}, {2}) VALUES (%s,%s) "
- "ON CONFLICT ({1}) DO UPDATE SET {2} = excluded.{2}".format(table, fields[0], fields[1])
+ f"INSERT INTO {table} ({fields[0]}, {fields[1]}) VALUES (%s,%s) "
+ f"ON CONFLICT ({fields[0]}) DO UPDATE SET {fields[1]} = excluded.{fields[1]}"
Review Comment:
Although I don't like `format()`, I agree with you on this point. I reverted some of my changes,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org