Skip to content

Commit 87393cc

Browse files
hugovkradarhere
andauthored
Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
1 parent 03bb283 commit 87393cc

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.github/compare-dist-sizes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def key_for(filename: str) -> str | None:
6060

6161
def display_for(filename: str) -> str:
6262
"""Strip the `pillow-{version}-` prefix for compact table display."""
63-
m = WHEEL_RE.match(filename)
64-
if m:
63+
if m := WHEEL_RE.match(filename):
6564
build = f"{m['build']}-" if m["build"] else ""
6665
return f"{build}{m['python']}-{m['abi']}-{m['platform']}.whl"
6766
if SDIST_RE.match(filename):
@@ -103,9 +102,7 @@ def human(n: int | None) -> str:
103102

104103

105104
def pct_change(before: int | None, after: int | None) -> str:
106-
if before is None or after is None:
107-
return "n/a"
108-
if before == 0:
105+
if not before or after is None:
109106
return "n/a"
110107
delta = (after - before) / before * 100
111108
return f"{delta:+.2f}%"

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ jobs:
265265
with:
266266
persist-credentials: false
267267

268-
- uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.10.1
268+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
269269
with:
270270
enable-cache: false
271271

0 commit comments

Comments
 (0)