ferruzzi commented on code in PR #32980:
URL: https://github.com/apache/airflow/pull/32980#discussion_r1279946992
##########
airflow/providers/microsoft/azure/hooks/wasb.py:
##########
@@ -184,15 +184,17 @@ def get_conn(self) -> BlobServiceClient:
# connection_string auth takes priority
return BlobServiceClient.from_connection_string(connection_string,
**extra)
+ account_url = conn.host if conn.host else
f"https://{conn.login}.blob.core.windows.net/"
+ if not account_url.startswith("https://"):
+ account_url = f"https://{conn.login}.blob.core.windows.net/"
Review Comment:
Seems like this could be simplified a few different ways.
Consider one of the following:
1. Making the `else` on L187 either an empty string or None, which would
trigger the `if` block below it.
2. Using a variable to hold the repeated "magic string".
3. `account_url = conn.host if conn.host.startswith("https://") else
f"https://{conn.login}.blob.core.windows.net/"`
--
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]