You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "o-nikolas (via GitHub)" <gi...@apache.org> on 2023/03/02 18:06:12 UTC

[GitHub] [airflow] o-nikolas commented on a diff in pull request #29871: Fix Amazon ECS Enums

o-nikolas commented on code in PR #29871:
URL: https://github.com/apache/airflow/pull/29871#discussion_r1123521462


##########
airflow/providers/amazon/aws/hooks/ecs.py:
##########
@@ -55,7 +55,24 @@ def should_retry_eni(exception: Exception):
     return False
 
 
-class EcsClusterStates(str, Enum):
+class _StringCompareEnum(Enum):

Review Comment:
   Should we put this in a more general place so that other modules can make use of it? 



##########
airflow/providers/amazon/aws/hooks/ecs.py:
##########
@@ -55,7 +55,24 @@ def should_retry_eni(exception: Exception):
     return False
 
 
-class EcsClusterStates(str, Enum):
+class _StringCompareEnum(Enum):
+    """
+    Enum which could be compared with regular `str` and subclasses.
+
+    This class for avoid multiple inheritance such as AwesomeEnum(str, Enum)
+    which is not work well with templated_fields, and Jinja templates.

Review Comment:
   ```suggestion
       Enum which can be compared with regular `str` and subclasses.
   
       This class avoids multiple inheritance such as AwesomeEnum(str, Enum)
       which does not work well with templated_fields and Jinja templates.
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org