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 2020/08/18 13:06:54 UTC

[GitHub] [airflow] AndersonReyes commented on a change in pull request #10349: infer multiple_output from return type annotation

AndersonReyes commented on a change in pull request #10349:
URL: https://github.com/apache/airflow/pull/10349#discussion_r472174260



##########
File path: airflow/operators/python.py
##########
@@ -249,6 +250,9 @@ def execute(self, context: Dict):
                                            f'multiple_outputs, found {key} ({type(key)}) instead')
             for key, value in return_value.items():
                 self.xcom_push(context, key, value)
+        elif is_container(return_value):
+            for i, value in enumerate(return_value):
+                self.xcom_push(context, str(i), value)

Review comment:
       gotcha fixed that, but wouldn't you want to index xcomarg though? like `output[0]` vs `output["return_value_0"]`




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