uranusjr commented on code in PR #25500:
URL: https://github.com/apache/airflow/pull/25500#discussion_r936248159
##########
airflow/models/abstractoperator.py:
##########
@@ -401,8 +414,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,
cast(MutableMapping[str, Any], context))
+ return render_template_to_string(template,
cast(MutableMapping[str, Any], context))
Review Comment:
Unrelated, but Mypy is complaining. `context` here is _implemented_ as a
MutableMapping (although we supply a type stub to say it’s not to prevent users
from getting a wrong idea), so this is fine.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]