ecerulm commented on PR #29016: URL: https://github.com/apache/airflow/pull/29016#issuecomment-1387133006
I had to introduce a `ConvertableToDict` abstract base class , in order to keep the `mypy` happy since `k8s.V1EnvVar` is not a dict. Initially I used `hasattr(item, "to_dict") but mypy will complain about the typing since `Redactable` is not guaranteed to have `to_dict`, and it seems that the mypy does not understand the `hasattr()` the same way it recognizes the `isinstance()` . -- 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]
