Skip to content

Commit

Permalink
replace unnecessary dict comprehension by dict() in providers (#33857)
Browse files Browse the repository at this point in the history
* replace unacessary dict comprehension by dict() in providers

* Update airflow/providers/google/cloud/operators/bigquery.py

Co-authored-by: Tzu-ping Chung <[email protected]>

---------

Co-authored-by: Tzu-ping Chung <[email protected]>
  • Loading branch information
hussein-awala and uranusjr committed Aug 30, 2023
1 parent eaf3471 commit a35c0d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/operators/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ def execute(self, context: Context):
self.log.info("Total extracted rows: %s", len(rows))

if self.as_dict:
table_data = [{k: v for k, v in row.items()} for row in rows]
table_data = [dict(row) for row in rows]
else:
table_data = [row.values() for row in rows]

Expand Down

0 comments on commit a35c0d4

Please sign in to comment.