def __attrs_post_init__(self): # The magic super() doesn't work here, so we use the explicit form. # Not using super(..., self) to work around pyupgrade bug. super(DecoratedMappedOperator, DecoratedMappedOperator).__attrs_post_init__(self) XComArg.apply_upstream_relationship(self, self.op_kwargs_expand_input.value)
def __attrs_post_init__(self): from airflow.models.xcom_arg import XComArg self._validate_argument_count() if self.task_group: self.task_group.add(self) if self.dag: self.dag.add_task(self) for k, v in self.mapped_kwargs.items(): if k in self.template_fields: XComArg.apply_upstream_relationship(self, v) for k, v in self.partial_kwargs.items(): if k in self.template_fields: XComArg.apply_upstream_relationship(self, v)
def __attrs_post_init__(self): from airflow.models.xcom_arg import XComArg self._validate_argument_count() if self.task_group: self.task_group.add(self) if self.dag: self.dag.add_task(self) XComArg.apply_upstream_relationship(self, self.expand_input.value) for k, v in self.partial_kwargs.items(): if k in self.template_fields: XComArg.apply_upstream_relationship(self, v) if self.partial_kwargs.get('sla') is not None: raise AirflowException( f"SLAs are unsupported with mapped tasks. Please set `sla=None` for task " f"{self.task_id!r}.")