abhijeets25012-tech commented on code in PR #60070:
URL: https://github.com/apache/airflow/pull/60070#discussion_r2678829149


##########
providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:
##########
@@ -1154,3 +1162,22 @@ def sqlalchemy_url(self) -> URL:
     def get_uri(self) -> str:
         """Return a SQLAlchemy engine URL as a string."""
         return self.sqlalchemy_url.render_as_string(hide_password=False)
+    def get_sqlalchemy_engine(self, engine_kwargs: dict[str, Any] | None = 
None):
+        """
+        Get a SQLAlchemy connection object.
+
+        :param engine_kwargs: Kwargs used in :func:`~sqlalchemy.create_engine`.
+        """
+        if not SQLALCHEMY_INSTALLED:

Review Comment:
   Thanks for pointing that out — you’re right.
   SQLALCHEMY_INSTALLED is not currently defined, which is why MyPy is failing. 
I’ll add a proper definition for it (based on whether SQLAlchemy can be 
imported) so the check works as intended.
   try:
       import sqlalchemy  
       SQLALCHEMY_INSTALLED = True
   except ImportError:
       SQLALCHEMY_INSTALLED = False
   
   



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