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 2019/07/17 08:04:00 UTC

[GitHub] [airflow] simpleranchero commented on a change in pull request #5461: [AIRFLOW-4835] Refactor render_template

simpleranchero commented on a change in pull request #5461: [AIRFLOW-4835] Refactor render_template
URL: https://github.com/apache/airflow/pull/5461#discussion_r304268695
 
 

 ##########
 File path: airflow/models/baseoperator.py
 ##########
 @@ -634,45 +634,39 @@ def __setstate__(self, state):
         self.__dict__ = state
         self._log = logging.getLogger("airflow.task.operators")
 
-    def render_template_from_field(self, attr, content, context, jinja_env):
+    def render_template(self, content: Any, context: Dict, jinja_env: jinja2.Environment = None) -> Any:
 
 Review comment:
   this is a type error. you declare `jinja_env: jinja2.Environment` and that assign `None`. you should either use `Optional[jinja2.Environment]` as the type hint or use another default value

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


With regards,
Apache Git Services