uranusjr commented on code in PR #22941:
URL: https://github.com/apache/airflow/pull/22941#discussion_r850287288
##########
airflow/decorators/base.py:
##########
@@ -384,6 +385,11 @@ def partial(self, **kwargs) -> "_TaskDecorator[Function,
OperatorSubclass]":
return attr.evolve(self, kwargs={**self.kwargs, "op_kwargs":
op_kwargs})
+ def override(self, **kwargs) -> "_TaskDecorator[Function,
OperatorSubclass]":
+ kw = copy.copy(self.kwargs)
+ kw.update(kwargs)
+ return attr.evolve(self, kwargs=kw)
Review Comment:
```suggestion
kw = copy.copy(self.kwargs)
kw.update(kwargs)
return attr.evolve(self, kwargs={**self.kwargs, **kwargs})
```
##########
airflow/decorators/base.py:
##########
@@ -384,6 +385,11 @@ def partial(self, **kwargs) -> "_TaskDecorator[Function,
OperatorSubclass]":
return attr.evolve(self, kwargs={**self.kwargs, "op_kwargs":
op_kwargs})
+ def override(self, **kwargs) -> "_TaskDecorator[Function,
OperatorSubclass]":
+ kw = copy.copy(self.kwargs)
+ kw.update(kwargs)
+ return attr.evolve(self, kwargs=kw)
Review Comment:
```suggestion
return attr.evolve(self, kwargs={**self.kwargs, **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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]