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 2022/01/24 14:14:52 UTC

[GitHub] [airflow] josh-fell commented on a change in pull request #21054: Improve handling of string type and non-attribute `template_fields`

josh-fell commented on a change in pull request #21054:
URL: https://github.com/apache/airflow/pull/21054#discussion_r790783616



##########
File path: airflow/models/baseoperator.py
##########
@@ -742,6 +742,16 @@ def __init__(
                 ]
             )
 
+        if isinstance(self.template_fields, str):
+            warnings.warn(
+                f"The `template_fields` value for {self.task_type} is a string "
+                "but should be a Sequence type. Converting to a Sequence type for execution. "
+                f"Please update {self.task_type} accordingly.",

Review comment:
       Excellent point.




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