FanatoniQ commented on code in PR #25185:
URL: https://github.com/apache/airflow/pull/25185#discussion_r933781297


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,13 @@ def get_conn(
         )
         return conn
 
+    def get_uri(self) -> str:
+        from urllib.parse import urlsplit, urlunsplit
+
+        r = list(urlsplit(super().get_uri()))
+        r[0] = "mssql+pymssql"  # fix to use pymssql driver
+        return urlunsplit(r)

Review Comment:
   > Still some pre-commits failed. I recommend (as in CONTRIBUTORS_GUIDE) to 
install pre-commit - it will fix most things automatically. Also `breeze 
static-check --last-commit` re-runs all relevant pre-commits for you 
automatically on last commit (so you need to rebase&squash to single commit 
before).
   
   Should be good now :smiley: 



##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,13 @@ def get_conn(
         )
         return conn
 
+    def get_uri(self) -> str:
+        from urllib.parse import urlsplit, urlunsplit
+
+        r = list(urlsplit(super().get_uri()))
+        r[0] = "mssql+pymssql"  # fix to use pymssql driver
+        return urlunsplit(r)

Review Comment:
   > Still some pre-commits failed. I recommend (as in CONTRIBUTORS_GUIDE) to 
install pre-commit - it will fix most things automatically. Also `breeze 
static-check --last-commit` re-runs all relevant pre-commits for you 
automatically on last commit (so you need to rebase&squash to single commit 
before).
   
   Checks should be good now :smiley: 



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