potiuk commented on code in PR #27264:
URL: https://github.com/apache/airflow/pull/27264#discussion_r1199597912


##########
airflow/providers/amazon/aws/hooks/dms.py:
##########
@@ -207,7 +207,7 @@ def wait_for_task_status(self, replication_task_arn: str, 
status: DmsTaskWaiterS
             raise TypeError("Status must be an instance of 
DmsTaskWaiterStatus")
 
         dms_client = self.get_conn()
-        waiter = dms_client.get_waiter(f"replication_task_{status}")
+        waiter = dms_client.get_waiter(f"replication_task_{status.value}")

Review Comment:
   From https://docs.python.org/3/whatsnew/3.11.html
   
   > Added 
[ReprEnum](https://docs.python.org/3/library/enum.html#enum.ReprEnum), which 
only modifies the 
[__repr__()](https://docs.python.org/3/reference/datamodel.html#object.__repr__)
 of members while returning their literal values (rather than names) for 
[__str__()](https://docs.python.org/3/reference/datamodel.html#object.__str__) 
and 
[__format__()](https://docs.python.org/3/reference/datamodel.html#object.__format__)
 (used by [str()](https://docs.python.org/3/library/stdtypes.html#str), 
[format()](https://docs.python.org/3/library/functions.html#format) and 
[f-string](https://docs.python.org/3/glossary.html#term-f-string)s).
   
   > Changed 
[Enum.__format__()](https://docs.python.org/3/library/enum.html#enum.Enum.__format__)
 (the default for 
[format()](https://docs.python.org/3/library/functions.html#format), 
[str.format()](https://docs.python.org/3/library/stdtypes.html#str.format) and 
[f-string](https://docs.python.org/3/glossary.html#term-f-string)s) to always 
produce the same result as Enum.__str__(): for enums inheriting from 
[ReprEnum](https://docs.python.org/3/library/enum.html#enum.ReprEnum) it will 
be the member’s value; for all other enums it will be the enum and member name 
(e.g. Color.RED).
   
   



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