cjsekl opened a new pull request #10025:
URL: https://github.com/apache/airflow/pull/10025
related: #9708
Adds type annotations to aws/Athena hook, operator & sensor.
Changed `AWSAthenaOperator.__init__` and `AWSAthenaSensor.__init__` to
remove the initialization of `self.hook=None` as `mypy` was failing with:
```
airflow/providers/amazon/aws/sensors/athena.py:78: error: Incompatible types
in
assignment (expression has type "AWSAthenaHook", variable has type "None")
self.hook = AWSAthenaHook(self.aws_conn_id, self.sleep_tim...
^
airflow/providers/amazon/aws/sensors/athena.py:79: error: Incompatible return
value type (got "None", expected "AWSAthenaHook")
return self.hook
^
Found 2 errors in 1 file (checked 1 source file)
```
----------------------------------------------------------------
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]