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

Replace 3rd-party thefuzz with stdlib difflib.get_close_matches #168

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

hugovk
Copy link
Owner

@hugovk hugovk commented Jul 29, 2023

I just heard about difflib.get_close_matches which is in the standard library, so we don't need to install the third-party thefuzz for the "Did you mean?" suggestions.

https://docs.python.org/3/library/difflib.html#difflib.get_close_matches

eol pthon
Product 'pthon' not found, run 'eol all' for list. Did you mean: 'python'? [Y/n]
...eol hph
Product 'hph' not found, run 'eol all' for list. Did you mean: 'php'? [Y/n]
...eol androd
Product 'androd' not found, run 'eol all' for list. Did you mean: 'android'? [Y/n]
...eol samsung
Product 'samsung' not found, run 'eol all' for list. Did you mean: 'samsung-mobile'? [Y/n]

Follow on from #132 and #143.

@hugovk hugovk added the changelog: Changed For changes in existing functionality label Jul 29, 2023
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #168 (a507e4c) into main (063b996) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
- Coverage   98.97%   98.96%   -0.01%     
==========================================
  Files           7        7              
  Lines         389      386       -3     
==========================================
- Hits          385      382       -3     
  Misses          4        4              
Flag Coverage Δ
macos-latest 98.96% <100.00%> (-0.01%) ⬇️
ubuntu-latest 98.96% <100.00%> (-0.01%) ⬇️
windows-latest 98.96% <100.00%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
src/norwegianblue/__init__.py 98.64% <100.00%> (-0.03%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hugovk hugovk force-pushed the difflib.get_close_matches branch from 913468c to a507e4c Compare July 29, 2023 09:50
@hugovk hugovk merged commit 2417301 into main Jul 31, 2023
44 checks passed
@hugovk hugovk deleted the difflib.get_close_matches branch July 31, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant