jhbigler commented on code in PR #31950:
URL: https://github.com/apache/airflow/pull/31950#discussion_r1232642277


##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -95,7 +95,12 @@ def get_conn(self) -> Connection:
         elif db.password:
             auth = trino.auth.BasicAuthentication(db.login, db.password)  # 
type: ignore[attr-defined]
         elif extra.get("auth") == "jwt":
-            auth = trino.auth.JWTAuthentication(token=extra.get("jwt__token"))
+            if("jwt__file" in extra):
+                with open(extra.get("jwt__file"), 'r') as jwt_file:

Review Comment:
   I'm hesitant to use the bracket notation `extra["..."]` in your suggestion 
because `extra.get("...")` is used elsewhere in this file before this commit, 
and I wanted to be consistent with the existing notation. Seems to be used in 
the code for other providers/hooks, too. I will, however, put in the other 
suggested changes from the static check



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