You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/06 14:10:29 UTC

[GitHub] [airflow] subkanthi commented on a change in pull request #20353: Fix mypy in providers/aws/hooks

subkanthi commented on a change in pull request #20353:
URL: https://github.com/apache/airflow/pull/20353#discussion_r779572254



##########
File path: airflow/providers/amazon/aws/hooks/athena.py
##########
@@ -228,7 +228,7 @@ def poll_query_status(self, query_execution_id: str, max_tries: Optional[int] =
             sleep(self.sleep_time)
         return final_query_state
 
-    def get_output_location(self, query_execution_id: str) -> str:
+    def get_output_location(self, query_execution_id: str) -> Optional[str]:

Review comment:
       The reason its Optional is because it can return None as output_location can be None
   
   `        output_location = None
   `
   Fixes this mypy error
   ```airflow/providers/amazon/aws/hooks/athena.py:253: error: Incompatible return value type (got "Optional[Any]", expected "str")
               return output_location```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org