kazanzhy commented on a change in pull request #20212:
URL: https://github.com/apache/airflow/pull/20212#discussion_r767136297



##########
File path: airflow/providers/snowflake/hooks/snowflake.py
##########
@@ -135,7 +137,7 @@ def __init__(self, *args, **kwargs) -> None:
         self.schema = kwargs.pop("schema", None)
         self.authenticator = kwargs.pop("authenticator", None)
         self.session_parameters = kwargs.pop("session_parameters", None)
-        self.query_ids = []
+        self.query_ids: List[str] = []

Review comment:
       I assume that in `run()` method this statement resets the list with ids.
   So it keeps just last run ids. I think that's reasonable

##########
File path: airflow/providers/snowflake/hooks/snowflake.py
##########
@@ -239,6 +247,8 @@ def run(self, sql: Union[str, list], autocommit: bool = 
False, parameters: Optio
         :type autocommit: bool
         :param parameters: The parameters to render the SQL query with.
         :type parameters: dict or iterable
+        :param handler: The result handler which is called with the result of 
each statement.
+        :type handler: dict or iterable

Review comment:
       Fixed

##########
File path: airflow/providers/snowflake/operators/snowflake.py
##########
@@ -230,7 +230,7 @@ def __init__(
         self.schema = schema
         self.authenticator = authenticator
         self.session_parameters = session_parameters
-        self.query_ids = []
+        self.query_ids: List[str] = []

Review comment:
       Yeah, unfortunately, it doesn't infer automatically. 
   I tried without this hint but mypy doesn't like it.




-- 
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: [email protected]

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


Reply via email to