kaxil commented on a change in pull request #10025:
URL: https://github.com/apache/airflow/pull/10025#discussion_r463206108
##########
File path: airflow/providers/amazon/aws/operators/athena.py
##########
@@ -73,19 +83,17 @@ def __init__( # pylint: disable=too-many-arguments
self.result_configuration = result_configuration or {}
self.sleep_time = sleep_time
self.max_tries = max_tries
- self.query_execution_id = None
- self.hook = None
+ self.query_execution_id = None # type: Optional[str]
- def get_hook(self):
+ @cached_property
+ def hook(self) -> AWSAthenaHook:
"""Create and return an AWSAthenaHook."""
return AWSAthenaHook(self.aws_conn_id, sleep_time=self.sleep_time)
- def execute(self, context):
+ def execute(self, context: Dict[Any, Any]) -> Optional[str]:
Review comment:
```suggestion
def execute(self, context: dict) -> Optional[str]:
```
since we don't have any specific hints inside Dict[Any, Any]
----------------------------------------------------------------
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]