Merge branch 'master' into expand-us-gb-dict
diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index ca45d6f..36e0b36 100755 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py
@@ -36,9 +36,10 @@ # Users might want to link this file into /usr/local/bin, so we resolve the # symbolic link path to the real path if necessary. _data_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') -_builtin_dictionaries = ( # name, desc, name, err in aspell, correction in aspell # noqa: E501 -# The aspell tests here aren't the ideal state, but the None's are realistic -# for obscure words +_builtin_dictionaries = ( + # name, desc, name, err in aspell, correction in aspell + # The aspell tests here aren't the ideal state, but the None's are + # realistic for obscure words ('clear', 'for unambiguous errors', '', False, None), ('rare', 'for rare but valid words', '_rare', None, None), ('informal', 'for informal words', '_informal', True, True), @@ -397,7 +398,7 @@ r = '' fixword = fix_case(wrongword, misspelling.data) while not r: - print("%s\t%s ==> %s (Y/n) " % (line, wrongword, fixword), end='') + print("%s\t%s ==> %s (Y/n) " % (line, wrongword, fixword), end='') r = sys.stdin.readline().strip().upper() if not r: r = 'Y' @@ -489,7 +490,7 @@ bad_count += 1 - print("%(FILENAME)s: %(WRONGWORD)s " + print("%(FILENAME)s: %(WRONGWORD)s" " ==> %(RIGHTWORD)s%(REASON)s" % {'FILENAME': cfilename, 'WRONGWORD': cwrongword, @@ -571,13 +572,13 @@ print_context(lines, i, context) if filename != '-': print("%(FILENAME)s:%(LINE)s: %(WRONGWORD)s " - " ==> %(RIGHTWORD)s%(REASON)s" + "==> %(RIGHTWORD)s%(REASON)s" % {'FILENAME': cfilename, 'LINE': cline, 'WRONGWORD': cwrongword, 'RIGHTWORD': crightword, 'REASON': creason}) else: - print('%(LINE)s: %(STRLINE)s\n\t%(WRONGWORD)s ' - '==> %(RIGHTWORD)s%(REASON)s' + print("%(LINE)s: %(STRLINE)s\n\t%(WRONGWORD)s " + "==> %(RIGHTWORD)s%(REASON)s" % {'LINE': cline, 'STRLINE': line.strip(), 'WRONGWORD': cwrongword, 'RIGHTWORD': crightword, 'REASON': creason})
diff --git a/codespell_lib/data/dictionary.txt b/codespell_lib/data/dictionary.txt index 51a5931..c8b5b43 100644 --- a/codespell_lib/data/dictionary.txt +++ b/codespell_lib/data/dictionary.txt
@@ -1,4 +1,5 @@ 1nd->1st +2rd->2nd 2st->2nd 3nd->3rd 3st->3rd @@ -909,6 +910,7 @@ airporta->airports airrcraft->aircraft aisian->asian +aixs->axis aizmuth->azimuth ajacence->adjacence ajacencies->adjacencies @@ -1367,6 +1369,7 @@ alredy->already alrelady->already alrms->alarms +alrogithm->algorithm alrteady->already als->also alse->also, else, @@ -1432,6 +1435,8 @@ ambiguos->ambiguous ambitous->ambitious ambuguity->ambiguity +ambulence->ambulance +ambulences->ambulances amdgput->amdgpu amendement->amendment amendmant->amendment @@ -2529,6 +2534,10 @@ attributen->attribute attributred->attributed attributs->attributes +attriebute->attribute +attriebuted->attributed +attriebutes->attributes +attriebuting->attributing attriubtes->attributes attriubute->attribute attrocities->atrocities @@ -2577,14 +2586,158 @@ autenticates->authenticates autenticating->authenticating autentication->authentication +authecate->authenticate +authecated->authenticated +authecates->authenticates +authecating->authenticating +authecation->authentication +authecator->authenticator +authecators->authenticators +authenaticate->authenticate +authenaticated->authenticated +authenaticates->authenticates +authenaticating->authenticating +authenatication->authentication +authenaticator->authenticator +authenaticators->authenticators +authencate->authenticate +authencated->authenticated +authencates->authenticates +authencating->authenticating +authencation->authentication +authencator->authenticator +authencators->authenticators +authenciate->authenticate +authenciated->authenticated +authenciates->authenticates +authenciating->authenticating +authenciation->authentication +authenciator->authenticator +authenciators->authenticators +authencicate->authenticate +authencicated->authenticated +authencicates->authenticates +authencicating->authenticating +authencication->authentication +authencicator->authenticator +authencicators->authenticators +authencity->authenticity +authencticate->authenticate +authencticated->authenticated +authencticates->authenticates +authencticating->authenticating +authenctication->authentication +authencticator->authenticator +authencticators->authenticators +authendicate->authenticate +authendicated->authenticated +authendicates->authenticates +authendicating->authenticating +authendication->authentication +authendicator->authenticator +authendicators->authenticators +authenenticate->authenticate +authenenticated->authenticated +authenenticates->authenticates +authenenticating->authenticating +authenentication->authentication +authenenticator->authenticator +authenenticators->authenticators +authenfie->authenticate +authenfied->authenticated +authenfies->authenticates +authenfiing->authenticating +authenfiion->authentication +authenfior->authenticator +authenfiors->authenticators +authenicae->authenticate +authenicaed->authenticated +authenicaes->authenticates +authenicaing->authenticating +authenicaion->authentication +authenicaor->authenticator +authenicaors->authenticators +authenicate->authenticate +authenicated->authenticated +authenicates->authenticates +authenicating->authenticating +authenication->authentication +authenicator->authenticator +authenicators->authenticators +authenificate->authenticate +authenificated->authenticated +authenificates->authenticates +authenificating->authenticating +authenification->authentication +authenificator->authenticator +authenificators->authenticators +authenitcate->authenticate +authenitcated->authenticated +authenitcates->authenticates +authenitcating->authenticating +authenitcation->authentication +authenitcator->authenticator +authenitcators->authenticators +autheniticate->authenticate +autheniticated->authenticated +autheniticates->authenticates +autheniticating->authenticating +authenitication->authentication +autheniticator->authenticator +autheniticators->authenticators +authenricate->authenticate +authenricated->authenticated +authenricates->authenticates +authenricating->authenticating +authenrication->authentication +authenricator->authenticator +authenricators->authenticators authentcated->authenticated authenticaiton->authentication authenticateion->authentication authentiction->authentication authentification->authentication auther->author +autherisation->authorisation +autherise->authorise +autherization->authorization +autherize->authorize authers->authors +authethenticate->authenticate +authethenticated->authenticated +authethenticates->authenticates +authethenticating->authenticating +authethentication->authentication +authethenticator->authenticator +authethenticators->authenticators +authethicate->authenticate +authethicated->authenticated +authethicates->authenticates +authethicating->authenticating +authethication->authentication +authethicator->authenticator +authethicators->authenticators +autheticate->authenticate +autheticated->authenticated +autheticates->authenticates +autheticating->authenticating authetication->authentication +autheticator->authenticator +autheticators->authenticators +authetnicate->authenticate +authetnicated->authenticated +authetnicates->authenticates +authetnicating->authenticating +authetnication->authentication +authetnicator->authenticator +authetnicators->authenticators +authetnticate->authenticate +authetnticated->authenticated +authetnticates->authenticates +authetnticating->authenticating +authetntication->authentication +authetnticator->authenticator +authetnticators->authenticators authobiographic->autobiographic authobiography->autobiography authoer->author @@ -2950,6 +3103,9 @@ baloons->balloons balse->false banannas->bananas +banch->branch, bench, +banched->branched, benched, +banches->branches, benches, bandwidht->bandwidth bandwidthm->bandwidth bandwitdh->bandwidth @@ -2960,6 +3116,12 @@ baout->about, bout, barbedos->barbados bariier->barrier +barnch->branch +barnched->branched +barncher->brancher +barnchers->branchers +barnches->branches +barnching->branching barriors->barriers barrriers->barriers barycentic->barycentric @@ -3049,6 +3211,7 @@ begginning->beginning beggins->begins begiinning->beginning +beginer->beginner begines->begins begining->beginning beginn->begin @@ -3117,6 +3280,7 @@ benchmkared->benchmarked benchmkaring->benchmarking benchmkars->benchmarks +benchs->benches benckmark->benchmark benckmarked->benchmarked benckmarking->benchmarking @@ -3206,6 +3370,7 @@ binominal->binomial bion->bio biridectionality->bidirectionality +bisct->bisect bistream->bitstream bitamps->bitmaps bitap->bitmap @@ -3372,9 +3537,10 @@ bradcast->broadcast brakpoint->breakpoint brakpoints->breakpoints -brance->branch, branches, +brance->branch, brace, branches, branchs->branches branck->branch +branckes->branches brancket->bracket branckets->brackets brane->brain @@ -3704,6 +3870,7 @@ caluclated->calculated caluclater->calculator caluclates->calculates +caluclating->calculating caluclator->calculator caluculate->calculate caluculated->calculated @@ -4202,6 +4369,7 @@ chceks->checks chck->check chckbox->checkbox +cheapeast->cheapest cheatta->cheetah chec->check checg->check @@ -4299,6 +4467,7 @@ chrashing->crashing, thrashing, trashing, chrashs->crashes, thrashes, trashes, chrminance->chrominance +chromum->chromium chuch->church chuks->chunks chunaks->chunks @@ -4646,7 +4815,19 @@ cofigured->configured cofigures->configures cofiguring->configuring +cofirm->confirm +cofirmation->confirmation +cofirmations->confirmations +cofirmed->confirmed +cofirming->confirming +cofirms->confirms coform->conform +cofrim->confirm +cofrimation->confirmation +cofrimations->confirmations +cofrimed->confirmed +cofriming->confirming +cofrims->confirms cognizent->cognizant coice->choice coincedentally->coincidentally @@ -5238,8 +5419,9 @@ compount->compound comppatible->compatible comprable->comparable +compre->compare, compère, compredded->compressed -compres->compress +compres->compress, compares, compresed->compressed compreser->compressor compreses->compresses @@ -5503,6 +5685,12 @@ confict->conflict conficted->conflicted conficts->conflicts +confidance->confidence +confidantal->confidential +confidantally->confidentially +confidantals->confidentials +confidantial->confidential +confidantially->confidentially confidental->confidential confidentally->confidentially confids->confides @@ -5583,6 +5771,12 @@ confoguration->configuration confort->comfort confortable->comfortable +confrim->confirm +confrimation->confirmation +confrimations->confirmations +confrimed->confirmed +confriming->confirming +confrims->confirms confucing->confusing confucion->confusion confuction->conjunction @@ -6352,6 +6546,7 @@ copright->copyright coprighted->copyrighted coprights->copyrights +coprocesor->coprocessor coprright->copyright coprrighted->copyrighted coprrights->copyrights @@ -6482,6 +6677,7 @@ correted->corrected corretion->correction corretly->correctly +corridoor->corridor corridoors->corridors corrispond->correspond corrispondant->correspondent @@ -7017,6 +7213,7 @@ deativates->deactivates deativation->deactivation deaults->defaults +deauthenication->deauthentication debain->Debian debateable->debatable debbuger->debugger @@ -7401,6 +7598,12 @@ deintialize->deinitialize deintialized->deinitialized deintializing->deinitializing +deisgn->design +deisgned->designed +deisgner->designer +deisgners->designers +deisgning->designing +deisgns->designs deivce->device deivces->devices deivices->devices @@ -7842,6 +8045,11 @@ deslected->deselected deslects->deselects desn't->doesn't +desogn->design +desogned->designed +desogner->designer +desogning->designing +desogns->designs desolve->dissolve desorder->disorder desoriented->disoriented @@ -8915,6 +9123,11 @@ doccuments->documents dockson->dachshund docmenetation->documentation +docmunet->document +docmunetation->documentation +docmuneted->documented +docmuneting->documenting +docmunets->documents docrines->doctrines docstatistik->docstatistic docsund->dachshund @@ -9109,6 +9322,7 @@ drammatic->dramatic dramtic->dramatic dran->drawn +drastical->drastically drasticaly->drastically drats->drafts draughtman->draughtsman @@ -10394,6 +10608,7 @@ existsing->existing existung->existing existy->exist +existying->existing exixst->exist exixt->exist exlamation->exclamation @@ -11059,6 +11274,10 @@ extesnions->extensions extint->extinct, extant, extist->exist +extit->exit +extited->excited, exited, +extiting->exciting, exiting, +extits->exits, excites, extnesion->extension extrac->extract extraced->extracted @@ -11476,25 +11695,188 @@ fogotten->forgotten fointers->pointers folde->folder, fold, -folling->following, falling, +foler->folder +folers->folders +folfer->folder +folfers->folders +folled->followed +foller->follower +follers->followers +follew->follow +follewed->followed +follewer->follower +follewers->followers +follewin->following +follewind->following +follewing->following +follewinwg->following +follewiong->following +follewiwng->following +follewong->following +follews->follows +follfow->follow +follfowed->followed +follfower->follower +follfowers->followers +follfowin->following +follfowind->following +follfowing->following +follfowinwg->following +follfowiong->following +follfowiwng->following +follfowong->following +follfows->follows +follin->following +follind->following +folling->following, falling, rolling, +follinwg->following +folliong->following +folliw->follow +folliwed->followed +folliwer->follower +folliwers->followers +folliwin->following +folliwind->following +folliwing->following +folliwinwg->following +folliwiong->following +folliwiwng->following +folliwng->following +folliwong->following +folliws->follows folllow->follow folllowed->followed +folllower->follower +folllowers->followers +folllowin->following +folllowind->following folllowing->following +folllowinwg->following +folllowiong->following +folllowiwng->following +folllowong->following folllows->follows, followings, follod->followed folloeing->following folloing->following folloiwng->following +follong->following followd->followed, follows, follow, followig->following followign->following followin->following followind->following followng->following +folls->follows +follw->follow +follwed->followed +follwer->follower +follwers->followers +follwin->following +follwind->following follwing->following +follwinwg->following +follwiong->following +follwiwng->following follwo->follow +follwoe->follow +follwoed->followed +follwoeed->followed +follwoeer->follower +follwoeers->followers +follwoein->following +follwoeind->following +follwoeing->following +follwoeinwg->following +follwoeiong->following +follwoeiwng->following +follwoeong->following +follwoer->follower +follwoers->followers +follwoes->follows +follwoin->following +follwoind->following follwoing->following +follwoinwg->following +follwoiong->following +follwoiwng->following +follwong->following +follwoong->following +follwos->follows +follwow->follow +follwowed->followed +follwower->follower +follwowers->followers +follwowin->following +follwowind->following +follwowing->following +follwowinwg->following +follwowiong->following +follwowiwng->following +follwowong->following +follwows->follows +follws->follows +follww->follow +follwwed->followed +follwwer->follower +follwwers->followers +follwwin->following +follwwind->following +follwwing->following +follwwinwg->following +follwwiong->following +follwwiwng->following +follwwong->following +follwws->follows +foloow->follow +foloowed->followed +foloower->follower +foloowers->followers +foloowin->following +foloowind->following +foloowing->following +foloowinwg->following +foloowiong->following +foloowiwng->following +foloowong->following +foloows->follows +folow->follow +folowed->followed +folower->follower +folowers->followers +folowin->following +folowind->following folowing->following +folowinwg->following +folowiong->following +folowiwng->following +folowong->following +folows->follows +foloww->follow +folowwed->followed +folowwer->follower +folowwers->followers +folowwin->following +folowwind->following +folowwing->following +folowwinwg->following +folowwiong->following +folowwiwng->following +folowwong->following +folowws->follows +folse->false +folwo->follow +folwoed->followed +folwoer->follower +folwoers->followers +folwoin->following +folwoind->following +folwoing->following +folwoinwg->following +folwoiong->following +folwoiwng->following +folwoong->following +folwos->follows folx->folks fomat->format fomated->formatted @@ -11710,6 +12092,9 @@ fuctions->functions fufill->fulfill fufilled->fulfilled +fugure->figure +fugured->figured +fugures->figures fule->file fulfiled->fulfilled fullfiled->fulfilled @@ -11838,6 +12223,8 @@ gae->game, Gael, gale, galatic->galactic Galations->Galatians +gallaries->galleries +gallary->gallery gallaxies->galaxies galvinized->galvanized Gameboy->Game Boy @@ -12773,6 +13160,7 @@ hypvervisors->hypervisors hypvisor->hypervisor hypvisors->hypervisors +I'sd->I'd i;ll->I'll iam->I am, aim, iamge->image @@ -13950,6 +14338,8 @@ instaled->installed instaling->installing installaion->installation +installaiton->installation +installaitons->installations installataion->installation installataions->installations installatation->installation @@ -14170,6 +14560,7 @@ interesst->interest interessted->interested interessting->interesting +intereview->interview interfave->interface interfear->interfere interfearence->interference @@ -14238,6 +14629,7 @@ interpretes->interprets interpretet->interpreted interpretion->interpretation +interpretions->interpretations interpretor->interpreter interprett->interpret interpretted->interpreted @@ -14698,6 +15090,7 @@ labatory->lavatory, laboratory, labed->labeled labeld->labelled +labirinth->labyrinth lable->label labled->labeled, labelled, lablels->labels @@ -14868,6 +15261,9 @@ leran->learn leraned->learned lerans->learns +lern->learn, lean, +lerned->learned, learnt, leaned, +lerning->learning, leaning, lesstiff->lesstif letgitimate->legitimate letmost->leftmost @@ -15236,7 +15632,12 @@ maneouvred->manoeuvred maneouvres->manoeuvres maneouvring->manoeuvring +mangaed->managed +mangaement->management +mangaer->manager, manger, +mangaers->managers, mangers, mangager->manager +mangagers->managers mangement->management mangementt->management manifacture->manufacture @@ -15989,6 +16390,10 @@ mosture->moisture mosty->mostly motation->notation, rotation, motivation, +moteur->motor +moteured->motored +moteuring->motoring +moteurs->motors mothing->nothing motiviated->motivated motiviation->motivation @@ -16135,6 +16540,7 @@ myraid->myriad mysef->myself mysefl->myself +mysekf->myself myslef->myself mysogynist->misogynist mysogyny->misogyny @@ -16143,6 +16549,7 @@ Mythraic->Mithraic myu->my nadly->badly +naerly->nearly, gnarly, nagivation->navigation naieve->naive namd->named, name, @@ -17666,6 +18073,7 @@ oxigen->oxygen oximoron->oxymoron oxzillary->auxiliary +oyu->you p0enis->penis paackage->package pacakge->package @@ -17951,6 +18359,7 @@ pathes->paths pathign->pathing pathnme->pathname +patholgoical->pathological patial->spatial paticular->particular paticularly->particularly @@ -17966,6 +18375,7 @@ pattren->pattern, patron, pattrens->patterns, patrons, pavillion->pavilion +pavillions->pavilions paínt->paint pblisher->publisher pbulisher->publisher @@ -18488,6 +18898,9 @@ portugese->Portuguese portuguease->portuguese portugues->Portuguese +posative->positive +posatives->positives +posativity->positivity poseesions->possessions posess->possess posessed->possessed @@ -18500,7 +18913,9 @@ posibilties->possibilities posible->possible posiitive->positive -posion->poison +posiitives->positives +posiitivity->positivity +posion->poison, Psion, posioned->positioned, poisoned, posioning->poisoning posisition->position @@ -19063,6 +19478,7 @@ proceses->processes proceshandler->processhandler procesing->processing +procesor->processor process'->process's processeed->processed processees->processes @@ -19256,6 +19672,8 @@ propertie->property, properties, propertise->properties propertly->properly, property, +propertu->property +propertus->properties propertys->properties propertyst->properties propery->property, properly, @@ -19519,6 +19937,7 @@ quartically->quadratically quatation->quotation quater->quarter +quating->quoting, squatting, quckstarter->quickstarter qudrangles->quadrangles quee->queue @@ -21065,12 +21484,14 @@ requeried->required reques->request requeset->request, requisite, +requesr->request requestd->requested requestes->requests, requested, requestesd->requested requestested->requested requestests->requests, requested, requestied->requested +requestying->requesting requeum->requiem requied->required requierd->required @@ -21129,6 +21550,7 @@ resarts->restarts resaurant->restaurant resaurants->restaurants +rescaned->rescanned rescource->resource rescources->resources rescrition->restriction @@ -21218,11 +21640,11 @@ responibilities->responsibilities responisble->responsible responnsibilty->responsibility -respons->response +respons->response, respond, responsabilities->responsibilities responsability->responsibility responsable->responsible -responsed->responded +responsed->responded, responses, responser's->responder's responser->responder responsers->responders @@ -21469,6 +21891,10 @@ revisisions->revisions revison->revision revisons->revisions +reviwed->reviewed +reviwer->reviewer +reviwers->reviewers +reviwing->reviewing revoluion->revolution revolutionar->revolutionary revrese->reverse @@ -21538,6 +21964,8 @@ roomate->roommate ropeat->repeat rorated->rotated +rosponse->response +rosponsive->responsive rotaion->rotation rotaions->rotations rotaiton->rotation @@ -21698,6 +22126,7 @@ satisifies->satisfies satisify->satisfy satisifying->satisfying +satistying->satisfying satric->satiric satrical->satirical satrically->satirically @@ -21818,6 +22247,8 @@ scraching->scratching scrachs->scratches scrao->scrap +screenchot->screenshot +screenchots->screenshots screenwrighter->screenwriter screnn->screen scriopted->scripted @@ -22821,6 +23252,7 @@ spcae->space spcecified->specified spcial->special +spcific->specific spcifies->specifies speach->speech speacial->special, spacial, @@ -22845,6 +23277,7 @@ speciallized->specialised, specialized, specialy->specially specic->specific +specical->special specication->specification specidic->specific specied->specified @@ -22970,6 +23403,7 @@ sporatic->sporadic sporious->spurious sppeches->speeches +spped->speed, sped, sipped, sapped, supped, sopped, spport->support spported->supported spporting->supporting @@ -23276,6 +23710,7 @@ stting->string stubborness->stubbornness stucked->stuck +stuckt->stuck stuct->struct stucts->structs stucture->structure @@ -23296,6 +23731,8 @@ stutdown->shutdown stutus->status styhe->style +styilistic->stylistic +stying->staying, styling, sub-lcuase->sub-clause subcatagories->subcategories subcatagory->subcategory @@ -23325,6 +23762,8 @@ subexpessions->subexpressions subexpresssion->subexpression subexpresssions->subexpressions +subfolfer->subfolder +subfolfers->subfolders subfroms->subforms subirectory->subdirectory subjec->subject @@ -23728,6 +24167,12 @@ suppports->supports suppres->suppress suppressingd->suppressing +supprot->support +supproted->supported +supproter->supporter +supproters->supporters +supproting->supporting +supprots->supports supprt->support supprted->supported suppy->supply @@ -24447,6 +24892,7 @@ thikning->thinking, thickening, thikns->thinks thiks->thinks +thime->time, theme, thyme, thine, thimngs->things thinigs->things thinkabel->thinkable @@ -24605,6 +25051,8 @@ titel->title titels->titles titile->title +tittled->titled +tittling->titling tje->the tjhe->the tjpanishad->upanishad @@ -25186,6 +25634,7 @@ unarchving->unarchiving unathenticated->unauthenticated unathorised->unauthorised +unauthenicated->unauthenticated unavaiable->unavailable unavaialable->unavailable unavaialbale->unavailable @@ -25211,6 +25660,7 @@ unborned->unborn unbunded->unbundled, unbounded, uncahnged->unchanged +uncalcualted->uncalculated unce->once uncehck->uncheck uncehcked->unchecked @@ -25666,6 +26116,7 @@ unrestrcited->unrestricted unrgesiter->unregister unroated->unrotated +unrosponsive->unresponsive unsable->unusable, usable, unstable, unsccessful->unsuccessful unsearcahble->unsearchable @@ -25803,6 +26254,9 @@ unziped->unzipped upadate->update upadated->updated +upadater->updater +upadates->updates +upadating->updating upadte->update upadted->updated upadter->updater @@ -26375,6 +26829,8 @@ vulnerabilties->vulnerabilities vulnerabilty->vulnerability vulnerablility->vulnerability +vulnerablities->vulnerabilities +vulnerablity->vulnerability vulnerabuilility->vulnerability vulnerabuilites->vulnerabilities vulnerabuiliti->vulnerability @@ -26509,6 +26965,10 @@ whihc->which whihch->which whilest->whilst +whiltelist->whitelist +whiltelisted->whitelisted +whiltelisting->whitelisting +whiltelists->whitelists whilw->while whioch->which whiped->wiped @@ -26712,6 +27172,9 @@ world-reknown->world renown world-reknowned->world renowned worls->world +worng->wrong, worn, +wornged->wronged +worngs->wrongs worser->worse worstened->worsened worthing->worth, meriting,
diff --git a/codespell_lib/data/dictionary_informal.txt b/codespell_lib/data/dictionary_informal.txt index c5561bd..5ff3446 100644 --- a/codespell_lib/data/dictionary_informal.txt +++ b/codespell_lib/data/dictionary_informal.txt
@@ -1,3 +1,4 @@ +dunno->don't know gonna->going to tho->though, to, thou, thru->through
diff --git a/codespell_lib/data/dictionary_rare.txt b/codespell_lib/data/dictionary_rare.txt index 90115d4..f79ee60 100644 --- a/codespell_lib/data/dictionary_rare.txt +++ b/codespell_lib/data/dictionary_rare.txt
@@ -111,7 +111,7 @@ singed->signed, singled, slippy->slippery specialties->specialities -specif->specific, specify, +specif->specify, specific, steams->streams sting->string stings->strings @@ -120,6 +120,8 @@ therefor->therefore therefrom->there from theses->these, thesis, +tittle->title +tittles->title toke->took tread->thread, treat, unknow->unknown
diff --git a/codespell_lib/tests/test_dictionary.py b/codespell_lib/tests/test_dictionary.py index 54e0e43..a71e4c7 100644 --- a/codespell_lib/tests/test_dictionary.py +++ b/codespell_lib/tests/test_dictionary.py
@@ -62,15 +62,17 @@ raise AssertionError('\n' + '\n'.join(errors)) -def _check_aspell(word, msg, in_aspell, fname): +def _check_aspell(phrase, msg, in_aspell, fname): if speller is None: return # cannot check if in_aspell is None: return # don't check - if ' ' in word: - return # can't check (easily) + if ' ' in phrase: + for word in phrase.split(): + _check_aspell(word, msg, in_aspell, fname) + return # stop normal checking as we've done each word above this_in_aspell = speller.check( - word.encode(speller.ConfigKeys()['encoding'][1])) + phrase.encode(speller.ConfigKeys()['encoding'][1])) end = 'be in aspell for dictionary %s' % (fname,) if in_aspell: # should be an error in aspell assert this_in_aspell, '%s should %s' % (msg, end) @@ -113,7 +115,8 @@ % (err,)) _check_aspell( r, 'error %s: correction %r' % (err, r), in_aspell[1], fname) - assert len(set(reps)) == len(reps), 'entries are not (lower-case) unique' + assert len(set(reps)) == len(reps), ('error %s: corrections "%s" are not ' + '(lower-case) unique' % (err, rep)) @pytest.mark.parametrize('err, rep, match', [ @@ -141,14 +144,24 @@ @pytest.mark.parametrize('err, rep, err_aspell, rep_aspell, match', [ # This doesn't raise any exceptions, so skip for now: # pytest.param('a', 'uvw, bar,', None, None, 'should be in aspell'), - ('abc', 'uvw, bar,', True, None, 'should be in aspell'), - ('a', 'uvw, bar,', False, None, 'should not be in aspell'), - ('a', 'abc, uvw,', None, True, 'should be in aspell'), - ('abc', 'uvw, bar,', True, True, 'should be in aspell'), - ('abc', 'uvw, bar,', False, True, 'should be in aspell'), + ('abcdef', 'uvwxyz, bar,', True, None, 'should be in aspell'), + ('a', 'uvwxyz, bar,', False, None, 'should not be in aspell'), + ('a', 'abcdef, uvwxyz,', None, True, 'should be in aspell'), + ('abcdef', 'uvwxyz, bar,', True, True, 'should be in aspell'), + ('abcdef', 'uvwxyz, bar,', False, True, 'should be in aspell'), ('a', 'bar, back,', None, False, 'should not be in aspell'), - ('abc', 'uvw, xyz,', True, False, 'should be in aspell'), - ('abc', 'uvw, bar,', False, False, 'should not be in aspell'), + ('abcdef', 'ghijkl, uvwxyz,', True, False, 'should be in aspell'), + ('abcdef', 'uvwxyz, bar,', False, False, 'should not be in aspell'), + # Multi-word corrections + # One multi-word, both parts + ('a', 'abcdef uvwxyz', None, True, 'should be in aspell'), + ('a', 'bar back', None, False, 'should not be in aspell'), + # Second multi-word, both parts + ('a', 'bar back, abcdef uvwxyz, bar,', None, True, 'should be in aspell'), + ('a', 'abcdef uvwxyz, bar back, ghijkl,', None, False, 'should not be in aspell'), # noqa: E501 + # One multi-word, second part + ('a', 'bar abcdef', None, True, 'should be in aspell'), + ('a', 'abcdef back', None, False, 'should not be in aspell'), ]) def test_error_checking_in_aspell(err, rep, err_aspell, rep_aspell, match): """Test that our error checking works with aspell."""