phi-friday commented on code in PR #41592:
URL: https://github.com/apache/airflow/pull/41592#discussion_r1723026156
##########
airflow/decorators/base.py:
##########
@@ -431,18 +431,67 @@ def _expand(self, expand_input: ExpandInput, *, strict:
bool) -> XComArg:
dag = task_kwargs.pop("dag", None) or DagContext.get_current_dag()
task_group = task_kwargs.pop("task_group", None) or
TaskGroupContext.get_current_task_group(dag)
- partial_kwargs, partial_params = get_merged_defaults(
+ default_args, partial_params = get_merged_defaults(
dag=dag,
task_group=task_group,
task_params=task_kwargs.pop("params", None),
task_default_args=task_kwargs.pop("default_args", None),
)
- partial_kwargs.update(
- task_kwargs,
- is_setup=self.is_setup,
- is_teardown=self.is_teardown,
- on_failure_fail_dagrun=self.on_failure_fail_dagrun,
- )
+ partial_kwargs: dict[str, Any] = {
+ "is_setup": self.is_setup,
+ "is_teardown": self.is_teardown,
+ "on_failure_fail_dagrun": self.on_failure_fail_dagrun,
+ }
+ # should be kept in sync with
BaseOperatorMeta.partial().partial_kwargs.
Review Comment:
Are you talking about `partial_keys`?
I tried it ```sig = inspect.signature(BaseOperator)```, and it makes a
difference as much as
```python
{'default_args',
'do_xcom_push',
'email_on_failure',
'email_on_retry',
'kwargs',
'multiple_outputs',
'params',
'post_execute',
'pre_execute',
'task_concurrency'}
```
I think I should remove `default_args`, `kwargs`, `multiple_outputs`, and
`params`, but other than that, can I use them as they are?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]