Skip to content

Commit

Permalink
Playlist snapshots: annotate snapshot record map. Re #155.
Browse files Browse the repository at this point in the history
Mypy: without annotating snapshot record map inside playlist snapshots method, Mypy will complain about assignment expression issues with type mismatch. Therefore annotate the map itself.
  • Loading branch information
josephsl committed Jan 26, 2021
1 parent fea9fe4 commit 3877917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/appModules/splstudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,8 @@ def playlistSnapshots(self, obj: Any, end: Any, snapshotFlags: Optional[list[str
# #55 (18.05): is this a complete snapshot?
completePlaylistSnapshot = obj.IAccessibleChildID == 1 and end is None
# Track count and total duration are always included.
snapshot = {}
# #155 (21.03): annotate snapshot map to avoid type annotation issues when assigning key/value pairs.
snapshot: dict[str, Any] = {}
if snapshotFlags is None:
snapshotFlags = [
flag for flag in splconfig.SPLConfig["PlaylistSnapshots"]
Expand Down

0 comments on commit 3877917

Please sign in to comment.