ashb commented on a change in pull request #19965:
URL: https://github.com/apache/airflow/pull/19965#discussion_r771509789
##########
File path: tests/serialization/test_dag_serialization.py
##########
@@ -1093,14 +1093,12 @@ def test_no_new_fields_added_to_base_operator(self):
tests should be added for it.
"""
base_operator = BaseOperator(task_id="10")
- fields = base_operator.__dict__
+ fields = {k: v for (k, v) in vars(base_operator).items() if k in
BaseOperator.get_serialized_fields()}
Review comment:
We don't, no, this is it. This will pick up anything added via `self.x`
in the constructor, but won't pick up things like `x: int = 0` at the class
level.
Think it's worth it?
--
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]