From 3f965f48cd5c208d42955530946384e06387f6d0 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Fri, 15 May 2026 17:57:44 -0700 Subject: [PATCH] =?UTF-8?q?Personalized=20playlists:=20ruff=20B905=20?= =?UTF-8?q?=E2=80=94=20explicit=20strict=3D=20on=20zip()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI ruff check failed on the seasonal_mix tuple-row coercion path where a `zip(columns, row)` call lacked an explicit `strict=`. Set `strict=False` to preserve the original intent (tolerant if the row shape ever drifts from the column tuple). The SELECT always returns 8 columns so the lengths match in practice; using strict=False just avoids a future raise if a generator drift changes that. Live happy path stays unchanged: rows from sqlite3.Row hit the `hasattr(r, 'keys')` branch above and never reach the zip line. The zip branch only runs for plain-tuple rows in tests. --- core/personalized/generators/seasonal_mix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/personalized/generators/seasonal_mix.py b/core/personalized/generators/seasonal_mix.py index 6062fe46..0d09853b 100644 --- a/core/personalized/generators/seasonal_mix.py +++ b/core/personalized/generators/seasonal_mix.py @@ -81,6 +81,7 @@ def _hydrate_seasonal_tracks(db, season_key: str, source: str, track_ids: List[s ('spotify_track_id', 'track_name', 'artist_name', 'album_name', 'album_cover_url', 'duration_ms', 'popularity', 'track_data_json'), r, + strict=False, )) td = r.get('track_data_json') if isinstance(td, str):