mlgruby commented on a change in pull request #11531:
URL: https://github.com/apache/airflow/pull/11531#discussion_r508813832
##########
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:
This `if` is because of `None` default value of `hook` and hence mypy
complaining for it?
I have seen several other places the same new if statement.
----------------------------------------------------------------
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]