Skip to content

Commit

Permalink
Get rid of typos with apostrophe replaced by semicolon (codespell-pro…
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored Sep 12, 2023
1 parent d1a4de6 commit dfb03fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 34 deletions.
33 changes: 0 additions & 33 deletions codespell_lib/data/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4866,10 +4866,8 @@ are'nt->aren't
aready->already
areea->area
aren's->aren't
aren;t->aren't
arent'->aren't
arent->aren't
arent;->aren't
areodynamics->aerodynamics
argement->argument
argements->arguments
Expand Down Expand Up @@ -8821,7 +8819,6 @@ campatibilities->compatibilities
campatibility->compatibility
campatible->compatible
campatibly->compatibly
can;t->can't
canabel->cannibal
canabels->cannibals
canabelyse->cannibalise
Expand Down Expand Up @@ -8959,7 +8956,6 @@ canonivally->canonically
canot->cannot
cant'->can't
cant't->can't
cant;->can't
cantact->contact
cantacted->contacted
cantacting->contacting
Expand Down Expand Up @@ -15159,10 +15155,8 @@ could't->couldn't
coulden't->couldn't
couldent->couldn't
couldn->could, couldn't,
couldn;t->couldn't
couldnt'->couldn't
couldnt->couldn't
couldnt;->couldn't
coulmn->column
coulmns->columns
couln't->couldn't
Expand Down Expand Up @@ -18488,11 +18482,9 @@ dicussion->discussion
dicussions->discussions
did'nt->didn't
didi->did
didn;t->didn't
didnt'->didn't
didnt't->didn't
didnt->didn't
didnt;->didn't
diea->idea, die,
diect->direct, dissect,
diected->directed, dissected,
Expand Down Expand Up @@ -19883,13 +19875,11 @@ doesing->doing, does, does in, dosing, dozing,
doesits->does its
doesn'->doesn't
doesn't't->doesn't
doesn;t->doesn't
doesnexist->doesn't exist
doesnot->doesn't, does not,
doesnt'->doesn't
doesnt't->doesn't
doesnt->doesn't, does not,
doesnt;->doesn't
doess->does
doestn't->doesn't
doign->doing
Expand Down Expand Up @@ -19970,13 +19960,10 @@ dosclosure->disclosure
dosclosures->disclosures
dosen't->doesn't
dosen->dozen, dose, doesn,
dosen;t->doesn't
dosens->dozens
dosent'->doesn't
dosent->doesn't
dosent;->doesn't
dosn't->doesn't
dosn;t->doesn't
dosnt->doesn't
dosposing->disposing
dosseay->dossier
Expand Down Expand Up @@ -26043,7 +26030,6 @@ gernerics->generics
ges->goes, guess,
gess->guess
get's->gets
get;s->gets
getfastproperyvalue->getfastpropertyvalue
getimezone->gettimezone
geting->getting
Expand Down Expand Up @@ -26680,7 +26666,6 @@ hashs->hashes
hashses->hashes
hasing->hashing
hask->hash
hasn;t->hasn't
hasnt'->hasn't
hasnt->hasn't
hass->hash
Expand All @@ -26694,7 +26679,6 @@ have'nt->haven't
havea->have, have a,
havee->have, have a,
haveing->having
haven;t->haven't
havent'->haven't
havent't->haven't
havent->haven't
Expand Down Expand Up @@ -27229,7 +27213,6 @@ hypvervisors->hypervisors
hypvisor->hypervisor
hypvisors->hypervisors
I'sd->I'd
i;ll->I'll
iamge->image
iamges->images
ibject->object
Expand Down Expand Up @@ -30863,12 +30846,10 @@ iserting->inserting
isimilar->similar
isloation->isolation
ismas->isthmus
isn;t->isn't
ISNB->ISBN
isnpiron->inspiron
isnt'->isn't
isnt->isn't
isnt;->isn't
isntalation->installation
isntalations->installations
isntall->install, isn't all,
Expand Down Expand Up @@ -35298,7 +35279,6 @@ nighborhood->neighborhood
nighboring->neighboring
nighlties->nightlies
nighlty->nightly
nightfa;;->nightfall
nighther->neither
nightime->nighttime
nihther->neither
Expand Down Expand Up @@ -46347,10 +46327,8 @@ shoul->should, shoal, shawl,
should'nt->shouldn't
should't->shouldn't
shouldbe->should, should be,
shouldn;t->shouldn't
shouldnt'->shouldn't
shouldnt->shouldn't
shouldnt;->shouldn't
shoule->should
shoulld->should
shouln't->shouldn't
Expand Down Expand Up @@ -50401,7 +50379,6 @@ thant->than
thar->than, that,
thare->there
thast->that, that's,
that;s->that's
thatn->that, than,
thatnk->thank
thatnked->thanked
Expand All @@ -50411,7 +50388,6 @@ thatnking->thanking
thatnks->thanks
thats'->that's
thats->that's
thats;->that's
thaught->thought, taught,
thaughts->thoughts
thay->they, that,
Expand Down Expand Up @@ -54235,8 +54211,6 @@ wakeus->wakeups, wake us, walrus,
wakup->wakeup
wallthickness->wall thickness
wan't->want, wasn't,
wan;t->want, wasn't,
want;s->wants
wantto->want to
wapped->wrapped, swapped, warped,
wapper->wrapper
Expand Down Expand Up @@ -54298,12 +54272,9 @@ warrnings->warnings
warrriors->warriors
was'nt->wasn't
was't->wasn't
was;t->wasn't
wasn->wasn't, was,
wasn;t->wasn't
wasnt'->wasn't
wasnt->wasn't
wasnt;->wasn't
wass->was
wastefull->wasteful, wastefully,
wastefullness->wastefulness
Expand Down Expand Up @@ -54442,7 +54413,6 @@ whheel->wheel
whhen->when
whic->which
whicg->which
which;s->which's
whichs->which's
whicht->which
whih->which
Expand Down Expand Up @@ -54712,7 +54682,6 @@ wolrdwide->worldwide
wolwide->worldwide
womans->woman's, women,
womens->women's, women,
won;t->won't
wonce->once, nonce, ponce, wince,
wonderfull->wonderful
wonderig->wondering
Expand Down Expand Up @@ -54824,10 +54793,8 @@ would'nt->wouldn't
would't->wouldn't
woulden't->wouldn't
wouldent->wouldn't
wouldn;t->wouldn't
wouldnt'->wouldn't
wouldnt->wouldn't
wouldnt;->wouldn't
wounderful->wonderful
wouold->would
wouuld->would
Expand Down
10 changes: 9 additions & 1 deletion codespell_lib/tests/test_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

import pytest

from codespell_lib._codespell import _builtin_dictionaries, supported_languages
from codespell_lib._codespell import (
_builtin_dictionaries,
supported_languages,
word_regex_def,
)

spellers = {}

Expand Down Expand Up @@ -302,6 +306,7 @@ def test_dictionary_looping(
"""Test that all dictionary entries are valid."""
this_err_dict = {}
short_fname = op.basename(fname)
word_regex = re.compile(word_regex_def)
with open(fname, encoding="utf-8") as fid:
for line in fid:
err, rep = line.split("->")
Expand All @@ -315,6 +320,9 @@ def test_dictionary_looping(
this_err_dict[err] = reps
# 1. check the dict against itself (diagonal)
for err in this_err_dict:
assert word_regex.fullmatch(
err
), f"error {err!r} does not match default word regex '{word_regex_def}'"
for r in this_err_dict[err]:
assert r not in this_err_dict, (
f"error {err}: correction {r} is an error itself "
Expand Down

0 comments on commit dfb03fd

Please sign in to comment.