mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix linting errors
This commit is contained in:
parent
8e554f52e3
commit
2f419ba384
1 changed files with 11 additions and 3 deletions
|
@ -957,18 +957,26 @@ class MicrosoftSSOHandler:
|
|||
)
|
||||
|
||||
all_group_ids = []
|
||||
next_link = MicrosoftSSOHandler.graph_api_user_groups_endpoint
|
||||
next_link: Optional[str] = (
|
||||
MicrosoftSSOHandler.graph_api_user_groups_endpoint
|
||||
)
|
||||
auth_headers = {"Authorization": f"Bearer {access_token}"}
|
||||
page_count = 0
|
||||
|
||||
while next_link and page_count < MicrosoftSSOHandler.MAX_GRAPH_API_PAGES:
|
||||
while (
|
||||
next_link is not None
|
||||
and page_count < MicrosoftSSOHandler.MAX_GRAPH_API_PAGES
|
||||
):
|
||||
group_ids, next_link = await MicrosoftSSOHandler.fetch_and_parse_groups(
|
||||
url=next_link, headers=auth_headers, async_client=async_client
|
||||
)
|
||||
all_group_ids.extend(group_ids)
|
||||
page_count += 1
|
||||
|
||||
if next_link and page_count >= MicrosoftSSOHandler.MAX_GRAPH_API_PAGES:
|
||||
if (
|
||||
next_link is not None
|
||||
and page_count >= MicrosoftSSOHandler.MAX_GRAPH_API_PAGES
|
||||
):
|
||||
verbose_proxy_logger.warning(
|
||||
f"Reached maximum page limit of {MicrosoftSSOHandler.MAX_GRAPH_API_PAGES}. Some groups may not be included."
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue