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/08/02 10:24:40 UTC

[GitHub] [airflow] barrywhart commented on a diff in pull request #25452: Improve Airflow logging for operator Jinja template processing

barrywhart commented on code in PR #25452:
URL: https://github.com/apache/airflow/pull/25452#discussion_r935385042


##########
airflow/models/abstractoperator.py:
##########
@@ -391,8 +404,8 @@ def render_template(
                 template = jinja_env.from_string(value)
             dag = self.get_dag()
             if dag and dag.render_template_as_native_obj:
-                return render_template_as_native(template, context)
-            return render_template_to_string(template, context)
+                return render_template_as_native(template, context)  # type: ignore[arg-type]
+            return render_template_to_string(template, context)  # type: ignore[arg-type]

Review Comment:
   These are the errors. When you say:
   >they need to be fixed first.
   
   Are you requesting that I fix them, or someone else will fix them?
   
   ```
   airflow/models/abstractoperator.py:402: error: Argument 2 to "render_template_as_native" has incompatible type "Context"; expected "MutableMapping[str, Any]"  [arg-type]
                       return render_template_as_native(template, context)
                                                                  ^
   airflow/models/abstractoperator.py:403: error: Argument 2 to "render_template_to_string" has incompatible type "Context"; expected "MutableMapping[str, Any]"  [arg-type]
                   return render_template_to_string(template, context)
   ```



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