romsharon98 commented on code in PR #41327:
URL: https://github.com/apache/airflow/pull/41327#discussion_r1778241204


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -22,10 +22,13 @@
 from typing import Any
 
 import pymssql
-from methodtools import lru_cache
 from pymssql import Connection as PymssqlConnection
 
-from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler
+from airflow.providers.common.sql.dialects.mssql import MsSqlDialect
+from airflow.providers.common.sql.hooks.sql import DbApiHook
+
+if TYPE_CHECKING:

Review Comment:
   > @eladkal @potiuk
   > 
   > I'm getting following error, I know what it means but don't understand 
what it causes:
   > 
   > ```
   > Found 5 errors in providers
   > Error: The `airflow.providers.apache.hive.transfers.mssql_to_hive` object 
in transfers list in airflow/providers/apache/hive/provider.yaml does not exist 
or is not a module: name 'TYPE_CHECKING' is not defined
   > Error: The `airflow.providers.google.cloud.transfers.mssql_to_gcs` object 
in transfers list in airflow/providers/google/provider.yaml does not exist or 
is not a module: name 'TYPE_CHECKING' is not defined
   > Error: The `airflow.providers.google.cloud.transfers.bigquery_to_mssql` 
object in transfers list in airflow/providers/google/provider.yaml does not 
exist or is not a module: name 'TYPE_CHECKING' is not defined
   > Error: The `airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook` 
object in connection-types list in 
airflow/providers/microsoft/mssql/provider.yaml does not exist or is not a 
class: name 'TYPE_CHECKING' is not defined
   > Error: The `airflow.providers.microsoft.mssql.hooks.mssql` object in hooks 
list in airflow/providers/microsoft/mssql/provider.yaml does not exist or is 
not a module: name 'TYPE_CHECKING' is not defined
   > Error 1 returned
   > Changed ownership of 3 files back to 1001:127.
   > /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/tempfile.py:830: 
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmperqkniqg'>
   >   _warnings.warn(warn_message, ResourceWarning)
   > ```
   
   
   you have missing import of TYPE_CHECKING.
   add to this file `from typing import TYPE_CHECKING`



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