Skip to content

Commit

Permalink
Work around lost type information
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Feb 25, 2024
1 parent d9b325c commit 7ecfcff
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mopidy_mpd/protocol/music_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,15 @@ def lsinfo(context: MpdContext, uri: str | None = None) -> protocol.Result:
)

if uri in (None, "", "/"):
result.extend(stored_playlists.listplaylists(context))
result.extend(
# We know that `listplaylists`` returns this specific variant of
# `protocol.Result``, but this information disappears because of the
# typing of the `protocol.commands.add()`` decorator.
cast(
protocol.ResultList,
stored_playlists.listplaylists(context),
)
)

return result

Expand Down

0 comments on commit 7ecfcff

Please sign in to comment.