uranusjr commented on PR #32627:
URL: https://github.com/apache/airflow/pull/32627#issuecomment-1669506766

   It is since `State.*` values are identical to `TaskInstanceState.*` values, 
and they all automatically downcast to str so equality comparisons would 
automatically work. I asusme those enums were designed specifically with this 
compatibility consideration in mind.
   
   ```pycon
   >>> from airflow.utils.state import State, TaskInstanceState
   >>> State.FAILED == "failed"
   True
   >>> TaskInstanceState.FAILED == "failed"
   True
   >>> TaskInstanceState.FAILED == State.FAILED
   True
   ```


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