uranusjr commented on a change in pull request #20743:
URL: https://github.com/apache/airflow/pull/20743#discussion_r786430565



##########
File path: airflow/models/baseoperator.py
##########
@@ -207,6 +207,7 @@ def apply_defaults(self: "BaseOperator", *args: Any, 
**kwargs: Any) -> Any:
 
             result = func(self, **kwargs, default_args=default_args)
             # Store the args passed to init -- we need them to support 
task.map serialzation!
+            kwargs.pop('task_id', None)

Review comment:
       Turns out this has an unfortunate side effect:
   
   ```pycon
   >>> FooOperator()
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: apply_defaults() missing 1 required keyword-only argument: 
'task_id'
   ```
   
   and error message seems to be hard-coded in the interpreter and cannot be 
patched. I’m trying yet another approach (see new commits)




-- 
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]


Reply via email to