Personalized playlists: ruff B905 — explicit strict= on zip()
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.
This commit is contained in:
parent
9cf1fe492b
commit
3f965f48cd
1 changed files with 1 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue