mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +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 = []
|
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}"}
|
auth_headers = {"Authorization": f"Bearer {access_token}"}
|
||||||
page_count = 0
|
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(
|
group_ids, next_link = await MicrosoftSSOHandler.fetch_and_parse_groups(
|
||||||
url=next_link, headers=auth_headers, async_client=async_client
|
url=next_link, headers=auth_headers, async_client=async_client
|
||||||
)
|
)
|
||||||
all_group_ids.extend(group_ids)
|
all_group_ids.extend(group_ids)
|
||||||
page_count += 1
|
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(
|
verbose_proxy_logger.warning(
|
||||||
f"Reached maximum page limit of {MicrosoftSSOHandler.MAX_GRAPH_API_PAGES}. Some groups may not be included."
|
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