Skip to content

Minor improvements to deezer plugin typing. #5814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

semohr
Copy link
Contributor

@semohr semohr commented Jun 2, 2025

Description

Added some more typehints to deezer plugin.

I know, it is properly not used much and we don't even have test for the deezer plugin but I want to make this a bit more maintainable, mainly to prepare for #5787 and make migration a bit easier.

@Copilot Copilot AI review requested due to automatic review settings June 2, 2025 11:24
Copy link

github-actions bot commented Jun 2, 2025

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances the Deezer plugin by adding and refining type hints to improve code maintainability and prepare for an upcoming migration.

  • Updated function signatures with type hints (e.g. commands, track_for_id, _get_track, _search_api).
  • Re-ordered and consolidated API URLs and fetch_data implementation.
  • Adjusted imports and type annotations across both beetsplug/deezer.py and beets/plugins.py.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
beetsplug/deezer.py Added type hints, updated function parameters/docstrings, and moved API URL definitions.
beets/plugins.py Updated _search_api type hints for query_type using Literal.
Comments suppressed due to low confidence (1)

beetsplug/deezer.py:149

  • The docstring for track_for_id still references a track_data parameter that was removed from the function signature. Please update the documentation to reflect the current parameters.
    :param track_data: (Optional) Simplified track object dict. May be provided instead of ``track_id`` to avoid unnecessary API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant