XD-DENG commented on a change in pull request #11170:
URL: https://github.com/apache/airflow/pull/11170#discussion_r495552458



##########
File path: airflow/providers/databricks/hooks/databricks.py
##########
@@ -208,10 +213,10 @@ def _do_api_call(self, endpoint_info, json):
             attempt_num += 1
             sleep(self.retry_delay)
 
-    def _log_request_error(self, attempt_num, error):
+    def _log_request_error(self, attempt_num: Any, error: Any) -> None:

Review comment:
       Again, adding `Any` here is causing an impression that we have higher 
type coverage, but doesn't really contribute real "value".

##########
File path: airflow/providers/databricks/hooks/databricks.py
##########
@@ -49,7 +50,7 @@ class RunState:
     Utility class for the run state concept of Databricks runs.
     """
 
-    def __init__(self, life_cycle_state, result_state, state_message):
+    def __init__(self, life_cycle_state: Any, result_state: Any, 
state_message: Any) -> None:

Review comment:
       Change in this line is not making much sense to me (putting `Any` is not 
adding coverage).
   
   If I'm not mistaken, all of them can be more strict type, `str`, rather than 
`Any`.

##########
File path: airflow/providers/databricks/hooks/databricks.py
##########
@@ -113,7 +118,7 @@ def __init__(
         self.retry_delay = retry_delay
 
     @staticmethod
-    def _parse_host(host):
+    def _parse_host(host: Any) -> str:

Review comment:
       The same issue here.




----------------------------------------------------------------
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]


Reply via email to