dabla commented on code in PR #69014:
URL: https://github.com/apache/airflow/pull/69014#discussion_r3485655204
##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py:
##########
@@ -311,7 +311,7 @@ def _build_request_adapter(self, connection) -> tuple[str,
RequestAdapter]:
scopes = scopes.split(",")
verify = config.get("verify", True)
trust_env = config.get("trust_env", False)
- allowed_hosts = (config.get("allowed_hosts", authority) or
"").split(",")
+ allowed_hosts = [host for host in (config.get("allowed_hosts",
authority) or "").split(",") if host]
Review Comment:
Why would you split if you already know allowed_hosts is an empty string? I
think above example can be even more optimized.
--
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]