Skip to main content

A tool to detect misspellings with opinionated additions

Project description

misspelling

linting: pylint

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

misspellings_lib-2.0.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

misspellings_lib-2.0.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file misspellings_lib-2.0.2.tar.gz.

File metadata

  • Download URL: misspellings_lib-2.0.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for misspellings_lib-2.0.2.tar.gz
Algorithm Hash digest
SHA256 1ec3809e292fdc382fbe5e078a2a018f2fed0c4e0ee28b32456884f75918af2a
MD5 d70aa097f1d76a4cf78fad3e25aae25f
BLAKE2b-256 a0908c7e7ccb9e2833edd910279d79f22b09e9aaf3029391f20b3545ee154d80

See more details on using hashes here.

File details

Details for the file misspellings_lib-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for misspellings_lib-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3cdd620ddcad686bad54b78cb732b57a7e54ea3f83bd2766f08ba0f614395bd
MD5 74318cab4ab1180c3013f4b121a6008a
BLAKE2b-256 ce6ac3f3a68882125f8a3e45796be8e76ca5b4248abd5c5309be6a7d1b5bf9c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page