Skip to content
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

search: adds functionality to remove search suggestion #678

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

comarquet
Copy link
Contributor

Related to #497

I modified parse_search_suggestions so that it retrieves the feedbackToken of each suggestion in the search bar and associates it with the number it is displayed when invoking get_search_suggestions, so that the function remove_search_suggestion can be called with the number as parameter to delete the corresponding entry.

image

@comarquet comarquet force-pushed the main branch 4 times, most recently from 8d7a9f7 to d6c417f Compare November 13, 2024 02:51
Copy link
Owner

@sigma67 sigma67 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the contribution! And you even added tests :)

Looks pretty good, some minor comments and suggestions below.

ytmusicapi/mixins/search.py Outdated Show resolved Hide resolved
ytmusicapi/mixins/search.py Outdated Show resolved Hide resolved
ytmusicapi/mixins/search.py Outdated Show resolved Hide resolved
ytmusicapi/mixins/search.py Outdated Show resolved Hide resolved
ytmusicapi/mixins/search.py Outdated Show resolved Hide resolved
ytmusicapi/parsers/search.py Outdated Show resolved Hide resolved
ytmusicapi/parsers/search.py Outdated Show resolved Hide resolved
ytmusicapi/parsers/search.py Outdated Show resolved Hide resolved
tests/mixins/test_search.py Show resolved Hide resolved
@comarquet
Copy link
Contributor Author

Hi ! Thank you for your feedback; it’s greatly appreciated. I’ve implemented all the changes you suggested.

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.96%. Comparing base (db732f2) to head (4801d3a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ytmusicapi/mixins/search.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #678      +/-   ##
==========================================
+ Coverage   94.88%   94.96%   +0.07%     
==========================================
  Files          38       38              
  Lines        2289     2304      +15     
==========================================
+ Hits         2172     2188      +16     
+ Misses        117      116       -1     
Flag Coverage Δ
unittests 94.96% <95.45%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sigma67
Copy link
Owner

sigma67 commented Dec 17, 2024

@comarquet thanks for your contribution! I've touched it up a bit and it's good to merge 🚀

@sigma67 sigma67 merged commit 1f14332 into sigma67:main Dec 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants