Skip to main content

misspellings

Build status

Spell checker for code

This is a Python library and tool to check for misspelled words in source code. It does this by looking for words from a list of common misspellings. The dictionary it uses to do this is based on the Wikipedia list of common misspellings.

The list has been slightly modified to remove some changes that cause a number of false positives. In particular ok->OK was removed (ok is frequently used in perl tests for instance).

Example

To try it out, merely run the following (using an old coreutils source tree as an example):

$ git clone git://git.sv.gnu.org/coreutils -b v8.10 coreutils
$ find coreutils -name '*.c' | misspellings -f -
coreutils/src/cat.c:754: efficency -> "efficiency"
coreutils/src/comm.c:198: funtion -> "function"
coreutils/src/expr.c:21: seperate -> "separate"
coreutils/src/pr.c:1417: accomodate -> "accommodate"
coreutils/src/tac.c:342: unneccessary -> "unnecessary"
coreutils/src/test.c:91: supressed -> "suppressed"

Contributions

Contributions are welcome! Please add unit tests for new features or bug fixes. To run all the unit tests run ./setup.py test. If you have tox installed, just run tox.

Note that tests are run on Travis for all supported python versions whenever the tree on github is pushed to.

TODO

Some items on the TODO list:

  • Implement option to interactively fix files.

  • Give some thought to supporting multiple languages?

  • Might a “common misspellings” list be different for different English users - might an American make one set of mistakes while a German writing English make another? Source of this data?

  • Fix pip upgrade bug.

  • Fix sed flag.

Credits

  • Kevin Lyda: Initial shell goo and python version.

  • myint: Better python idioms and style. Mixed case support.

    Travis support.

  • Maciej Blizinski: Potential use in opencsw pushed move to python.

  • Ville Skyttä: Sped up wordification, editor-friendly reporting.

Metadata

Release files for misspellings 1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for misspellings 1.5
File Size Uploaded Provenance
misspellings-1.5.tar.gz 79.4 kB Without provenance Details

Release files / misspellings-1.5.tar.gz

Download URL misspellings-1.5.tar.gz
Size 79.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bc3cdc98a2bc61ff5cc6fa0206601a1bb8d727c8cfc85962bf6526e9f513ab4c
BLAKE2b-256 checksum
How to use checksums
16dc70f69ca53f1802a55a9ea74d7d8e90e81dfbbafa98273dc79b66b93f70f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for misspellings 1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page