Skip to content

Commit

Permalink
[pre-commit.ci] Apply automatic pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 14, 2025
1 parent 7b6f87e commit aed2728
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ def get_username_hook(spawner):


def get_conda_store_environments(user_info: dict):
import math

import urllib3
import yarl
import math

external_url = z2jh.get_config("custom.conda-store-service-name")
token = z2jh.get_config("custom.conda-store-jhub-apps-token")
Expand All @@ -49,8 +50,10 @@ def get_conda_store_environments(user_info: dict):
if total_records > size_limit:
# Already pulled the first page of results, start looping through
# the envs starting on the 2nd page
for page in range(2, math.ceil(total_records/size_limit)+1):
url = yarl.URL(f"http://{external_url}/{endpoint}/?size={size_limit}&page={page}")
for page in range(2, math.ceil(total_records / size_limit) + 1):
url = yarl.URL(
f"http://{external_url}/{endpoint}/?size={size_limit}&page={page}"
)
response = http.request(
"GET", str(url), headers={"Authorization": f"Bearer {token}"}
)
Expand Down

0 comments on commit aed2728

Please sign in to comment.