Skip to main content

misspelling

Spell checker for code

This is a project originally imported/forked from the abandoned project https://github.com/lyda/misspell-check

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).

Opinionated version

This includes custom additions that should be considered opinionated, such as cancellation vs. cancelation. This is not recommended for anyone's use.

Contributions

Contributions are welcome! Please add unit tests for new features or bug fixes. To run all the unit tests run pytest tests/.

You can review coverage of added tests by running pytest --cov=tests.

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

The packaged version is available via pip or easy_install as misspellings-lib. The project page is on pypi:

The source code is available in the following locations:

Pull requests on any of those platforms or emailed patches are fine.

To do

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 sed flag. We need to have it support sed -i optionally, have it output all unambiguous sed commands, have it be more careful on what it replaces. It might also be an idea to have a perl output option.
  • Use generators to allow finding errors as you go. However, currently misspellings grabs all files first, then checks them, which can take a while.
  • Lacking tests for misspellings cli.

Credits

Metadata

Release files for misspellings-lib 2.0.9

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-lib 2.0.9
File Size Uploaded Provenance Actions
misspellings_lib-2.0.9.tar.gz 55.0 kB Without provenance Details for misspellings_lib-2.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for misspellings-lib 2.0.9
File Interpreter ABI Platform Actions
misspellings_lib-2.0.9-py3-none-any.whl Python 3 none any Details for misspellings_lib-2.0.9-py3-none-any.whl

Total release size: 110.9 kB

Release files / misspellings_lib-2.0.9.tar.gz

Download URL misspellings_lib-2.0.9.tar.gz
Size 55.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7887f524a5ed9d2bf9680e44135f14b290ef2ad1f5bf1392b4b1c72ce5fece86
BLAKE2b-256 checksum
How to use checksums
1e8a9cd4358c90116addbc385a4568001bbec2433c21ef9fd567bf5f75571251
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / misspellings_lib-2.0.9-py3-none-any.whl

Download URL misspellings_lib-2.0.9-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c27d9561cafdad623fac51b0af2e0d09054483e5c4e7af26465cb4d34e6d090
BLAKE2b-256 checksum
How to use checksums
c1ed2d71929c597b2903fd01522d434b7bc31a130af7ca4f7c77a15e401fad77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Security for misspellings-lib 2.0.9

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