You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/13 08:54:22 UTC

[GitHub] [airflow] ashb commented on a change in pull request #15057: Origin/bugfix/issue #15023 / Add validation for dag_run conf to be a dict

ashb commented on a change in pull request #15057:
URL: https://github.com/apache/airflow/pull/15057#discussion_r631665767



##########
File path: airflow/providers/apache/hive/hooks/hive.py
##########
@@ -426,7 +426,7 @@ def load_file(
         if create or recreate:
             if field_dict is None:
                 raise ValueError("Must provide a field dict when creating a table")
-            fields = ",\n    ".join(['`{k}` {v}'.format(k=k.strip('`'), v=v) for k, v in field_dict.items()])
+            fields = ",\n    ".join([f"`{k.strip('`')}` {v}" for k, v in field_dict.items()])

Review comment:
       This change looks unrelated -- is it?

##########
File path: airflow/providers/apache/hive/hooks/hive.py
##########
@@ -426,7 +426,7 @@ def load_file(
         if create or recreate:
             if field_dict is None:
                 raise ValueError("Must provide a field dict when creating a table")
-            fields = ",\n    ".join(['`{k}` {v}'.format(k=k.strip('`'), v=v) for k, v in field_dict.items()])
+            fields = ",\n    ".join([f"`{k.strip('`')}` {v}" for k, v in field_dict.items()])

Review comment:
       ```suggestion
                fields = ",\n    ".join(['`{k}` {v}'.format(k=k.strip('`'), v=v) for k, v in field_dict.items()])
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org