def _is_excluded(cls, var: Any, attrname: str, op: BaseOperator): if var is not None and op.has_dag() and attrname.endswith("_date"): # If this date is the same as the matching field in the dag, then # don't store it again at the task level. dag_date = getattr(op.dag, attrname, None) if var is dag_date or var == dag_date: return True return super()._is_excluded(var, attrname, op)
def _is_excluded(cls, var: Any, attrname: str, op: BaseOperator): if var is not None and op.has_dag() and attrname.endswith("_date"): # If this date is the same as the matching field in the dag, then # don't store it again at the task level. dag_date = getattr(op.dag, attrname, None) if var is dag_date or var == dag_date: return True if attrname in {"executor_config", "params"} and not var: # Don't store empty executor config or params dicts. return True return super()._is_excluded(var, attrname, op)