Miretpl commented on code in PR #70879:
URL: https://github.com/apache/airflow/pull/70879#discussion_r3779247048


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py:
##########
@@ -36,7 +36,7 @@ def _get_token_endpoint(tenant_id: str) -> str:
 def _get_scopes(options: dict[str, Any]) -> list[str]:
     scopes = options.get("scope") or options.get("scopes") or DEFAULT_SCOPE
     if isinstance(scopes, str):
-        return scopes.split()
+        return scopes.replace(",", " ").split()

Review Comment:
   ```suggestion
           return [scope.strip() for scope in scopes.replace(",", " ").split() 
if scope.strip()]
   ```
   The version proposed by Jarek is safer, as there will be no empty strings 
returned by the function in a case when the user would provide, e.g. 
"User.Read, Files.Read" value in connection.



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