-
Notifications
You must be signed in to change notification settings - Fork 485
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
FIX: Caps and pytest #482
FIX: Caps and pytest #482
Conversation
Codecov Report
@@ Coverage Diff @@
## master #482 +/- ##
==========================================
+ Coverage 87.81% 88.77% +0.95%
==========================================
Files 2 3 +1
Lines 665 704 +39
Branches 93 100 +7
==========================================
+ Hits 584 625 +41
+ Misses 62 60 -2
Partials 19 19
Continue to review full report at Codecov.
|
@luzpaz @EdwardBetts feel free to have a look if you have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor issues with the dictionary data.
Can I suggest, rather than throwing away the existing metadata in the dictionary in terms of case (on the replacement side), can I suggest just lower casing it in the code for now. Then at some point in the future when someone improves it, it could do the correct case changes too (potentially even looking at the case of the incorrect spelling to decide whether to use as offered, or all upper on the output).
codespell_lib/data/dictionary.txt
Outdated
@@ -784,7 +784,7 @@ aparment->apartment | |||
apear->appear | |||
apeends->appends | |||
apendix->appendix | |||
apenines->apennines, Apennines, | |||
apenines->apennines, apennines, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now the same suggested correction twice. Which again I guess the dictionary validation ought to catch.
codespell_lib/data/dictionary.txt
Outdated
@@ -809,7 +809,7 @@ appedn->append | |||
appendent->appended | |||
appendign->appending | |||
appeneded->appended | |||
appenines->apennines, Apennines, | |||
appenines->apennines, apennines, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again
Agreed @peternewman, feel free to look to see if this is what you had in mind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more minor comments, but LGTM.
codespell_lib/_codespell.py
Outdated
@@ -304,6 +304,10 @@ def build_dict(filename): | |||
with codecs.open(filename, mode='r', buffering=1, encoding='utf-8') as f: | |||
for line in f: | |||
[key, data] = line.split('->') | |||
# For now, convert both to lower. Someday we can maybe add support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a TODO, or do you not do that in Codespell?
@@ -1531,8 +1530,7 @@ bootstapped->bootstrapped | |||
bootstapping->bootstrapping | |||
bootstaps->bootstraps | |||
boradcast->broadcast | |||
bordrelines->borderline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest this should be:
bordreline->borderline
bordrelines->borderlines
Given:
https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance
Which I can't remember where I found, possibly here.
Thanks for the looks @peternewman, I'll merge after the CIs come back happy from this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR:
lower
dictionary.txt
entries that used to be non-lowerpytest
instead ofnose
sincenose
is no longer maintainedassert
inpytest
style