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



##########
File path: airflow/providers/databricks/operators/databricks.py
##########
@@ -250,23 +251,23 @@ class DatabricksSubmitRunOperator(BaseOperator):
     def __init__(
         self,
         *,
-        json=None,
-        spark_jar_task=None,
-        notebook_task=None,
-        spark_python_task=None,
-        spark_submit_task=None,
-        new_cluster=None,
-        existing_cluster_id=None,
-        libraries=None,
-        run_name=None,
-        timeout_seconds=None,
-        databricks_conn_id='databricks_default',
-        polling_period_seconds=30,
-        databricks_retry_limit=3,
-        databricks_retry_delay=1,
-        do_xcom_push=False,
+        json: Optional[Any] = None,

Review comment:
       Should this be `Optional[Dict]`?

##########
File path: airflow/providers/odbc/hooks/odbc.py
##########
@@ -202,15 +202,17 @@ def get_conn(self) -> pyodbc.Connection:
         conn = pyodbc.connect(self.odbc_connection_string, 
**self.connect_kwargs)
         return conn
 
-    def get_uri(self):
+    def get_uri(self) -> str:
         """
         URI invoked in 
:py:meth:`~airflow.hooks.dbapi_hook.DbApiHook.get_sqlalchemy_engine` method
         """
         quoted_conn_str = quote_plus(self.odbc_connection_string)
         uri = f"{self.sqlalchemy_scheme}:///?odbc_connect={quoted_conn_str}"
         return uri
 
-    def get_sqlalchemy_connection(self, connect_kwargs=None, 
engine_kwargs=None):
+    def get_sqlalchemy_connection(
+        self, connect_kwargs: Optional[dict] = None, engine_kwargs: 
Optional[dict] = None
+    ) -> Any:

Review comment:
       Is this returning a more specific type?

##########
File path: airflow/providers/databricks/hooks/databricks.py
##########
@@ -325,9 +331,9 @@ class _TokenAuth(AuthBase):
     magic function.
     """
 
-    def __init__(self, token):
+    def __init__(self, token: str) -> None:
         self.token = token
 
-    def __call__(self, r):
+    def __call__(self, r: PreparedRequest) -> PreparedRequest:

Review comment:
       May you provide a bit more info about this type? Say any link reference 
to requests doc relating to this? Thanks.




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