uranusjr commented on a change in pull request #20945:
URL: https://github.com/apache/airflow/pull/20945#discussion_r789892731
##########
File path: airflow/models/baseoperator.py
##########
@@ -1826,11 +1753,47 @@ def get_serialized_fields(cls):
'operator_extra_links',
'upstream_task_ids',
'task_type',
+ # These are automatically populated from partial_kwargs. In
+ # a perfect world, they should be properties like other
+ # partial_kwargs-populated values e.g. 'queue' below, but
we
+ # must match BaseOperator's implementation and declare them
+ # as writable attributes instead.
Review comment:
Uh, Mypy is not smart enough unfortunately python/mypy#4125.
We can’t use the Protocol workaround mentioned in the issue either because
`BaseOperator` has a custom metaclass, while `Protocol` is also implemented
with metaclass, and the two would conflict.
--
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]