mlgruby commented on a change in pull request #11170:
URL: https://github.com/apache/airflow/pull/11170#discussion_r495596033



##########
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:
       it returns an authorization connection object 
   in dbapi_hook.py the definition of connection function is as below which is 
a return for above function:  
   
   ```python
   def connect(self, host: str, port: int, username: str, schema: str) -> Any:
   ```
   
   hence used `Any` 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