ashb commented on a change in pull request #21505:
URL: https://github.com/apache/airflow/pull/21505#discussion_r804767584



##########
File path: airflow/decorators/base.py
##########
@@ -337,30 +361,47 @@ def _merge_kwargs(
     return {**kwargs1, **kwargs2}
 
 
-@attr.define(kw_only=True)
+@attr.define(kw_only=True, repr=False)
 class DecoratedMappedOperator(MappedOperator):
     """MappedOperator implementation for @task-decorated task function."""
 
     multiple_outputs: bool
     python_callable: Callable
 
-    def create_unmapped_operator(self, dag: "DAG") -> BaseOperator:
+    # We can't save these in partial_kwargs because op_args and op_kwargs need
+    # to be present in mapped_kwargs, and MappedOperator prevents duplication.
+    partial_op_kwargs: Dict[str, Any]
+
+    @classmethod
+    @cache
+    def get_serialized_fields(cls):
+        return MappedOperator.get_serialized_fields() | {"partial_op_kwargs"}

Review comment:
       Any reason to not user super here?
   
   ```suggestion
           return super().get_serialized_fields() | {"partial_op_kwargs"}
   ```




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to