potix2 commented on a change in pull request #11531:
URL: https://github.com/apache/airflow/pull/11531#discussion_r508881355



##########
File path: airflow/providers/amazon/aws/sensors/cloud_formation.py
##########
@@ -86,8 +95,10 @@ def poke(self, context):
             return False
         raise ValueError(f'Stack {self.stack_name} in bad state: 
{stack_status}')
 
-    def get_hook(self):
+    def get_hook(self) -> AWSCloudFormationHook:
         """Create and return an AWSCloudFormationHook"""
-        if not self.hook:
-            self.hook = AWSCloudFormationHook(aws_conn_id=self.aws_conn_id, 
region_name=self.region_name)
+        if self.hook:

Review comment:
       Yes. get_hook() returns an actual value, but in the original form mypy 
hence type error.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to