Skip to content

Commit

Permalink
rye fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp committed Mar 4, 2024
1 parent c3f3261 commit 264a4c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions rye-devtools/src/rye_devtools/find_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ async def find(self) -> list[PythonDownload]:

async def fetch_indygreg_downloads(self, pages: int = 100) -> list[PythonDownload]:
"""Fetch all the indygreg downloads from the release API."""
results: dict[Version, dict[tuple[str, str, str | None], list[PythonDownload]]] = {}
results: dict[
Version, dict[tuple[str, str, str | None], list[PythonDownload]]
] = {}

for page in range(1, pages):
log(f"Fetching indygreg release page {page}")
Expand All @@ -152,7 +154,12 @@ async def fetch_indygreg_downloads(self, pages: int = 100) -> list[PythonDownloa
# For now, we only group by arch and platform, because Rust's PythonVersion doesn't have a notion
# of environment. Flavor will never be used to sort download choices and must not be included in grouping.
.setdefault(
(download.triple.arch, download.triple.platform, download.triple.environment), []
(
download.triple.arch,
download.triple.platform,
download.triple.environment,
),
[],
)
.append(download)
)
Expand Down
6 changes: 5 additions & 1 deletion rye-devtools/src/rye_devtools/find_uv_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ def render(downloads: list[UvDownload]):
version = download.version
sha = download.sha256
url = download.url
env = f'Some(Cow::Borrowed("{triple.environment}"))' if triple.environment else "None"
env = (
f'Some(Cow::Borrowed("{triple.environment}"))'
if triple.environment
else "None"
)
print(
f' UvDownload {{arch: Cow::Borrowed("{triple.arch}"), os: Cow::Borrowed("{triple.platform}"), environment: {env}, major: {version.major}, minor: {version.minor}, patch: {version.patch}, suffix: None, url: Cow::Borrowed("{url}"), sha256: Cow::Borrowed("{sha}") }},'
)
Expand Down

0 comments on commit 264a4c7

Please sign in to comment.