Skip to main content

Spellcheck variables, comments and docstrings

Project description

CircleCI Black PyPi

Flake8 Plugin that spellchecks variables, functions, classes and other bits of your python code.

You can whitelist words that are specific to your project simply by adding them to whitelist.txt in the root of your project directory. Each word you add should be separated by a newline.

Spelling is assumed to be in en_US.

This plugin supports python 3.7+

Codes

  • SC100 - Spelling error in comments

  • SC200 - Spelling error in name (e.g. variable, function, class)

Enable Django support

You can enable support for a Django dictionary by adding the following to your flake8 configuration (e.g. your .flake8 file):

[flake8]
dictionaries=en_US,python,technical,django

Enable pandas support

You can enable support for pandas DataFrames by adding the following to your flake8 configuration (e.g. your .flake8 file):

[flake8]
dictionaries=en_US,python,technical,pandas

Specify Targets

Both comments and names (variable names, function names…) are spellchecked by default. You can specify what targets to spellcheck in your flake8 configuration (e.g. in your .flake8 file):

[flake8]
spellcheck-targets=comments

The above configuration would only spellcheck comments

[flake8]
spellcheck-targets=names

The above configuration would only spellcheck names

Contributing

If you have found word(s) which are listed as a spelling error but are actually correct terms used in python or in technical implementations (e.g. http), then you can very easily contribute by adding those word(s) to the appropriate dictionaries:

Before you submit a PR, it is recommended to run check-sorting.sh in the root of this repository, to verify that all the dictionary files are still sorted correctly. Sorting is enforced by CI, so you’ll need to make sure the files are sorted before your PR can be merged.

Developing

  • Run pip install -r dev-requirements.txt

  • Install pre-commit and run pre-commit install --install-hooks

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

flake8-spellcheck-0.26.0.tar.gz (339.5 kB view details)

Uploaded Source

Built Distribution

flake8_spellcheck-0.26.0-py2.py3-none-any.whl (333.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flake8-spellcheck-0.26.0.tar.gz.

File metadata

  • Download URL: flake8-spellcheck-0.26.0.tar.gz
  • Upload date:
  • Size: 339.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.27.1 setuptools/58.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.12

File hashes

Hashes for flake8-spellcheck-0.26.0.tar.gz
Algorithm Hash digest
SHA256 882de0b5c374fa9312ea4165f71f5583e6f4616f1661c5598378353df50796f4
MD5 5073b87d91e0ffe639a633710791f1ed
BLAKE2b-256 d0f3372b4d39ceb02980a33a27195b5fe499cec851755677213814673ee65c5b

See more details on using hashes here.

File details

Details for the file flake8_spellcheck-0.26.0-py2.py3-none-any.whl.

File metadata

  • Download URL: flake8_spellcheck-0.26.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 333.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.27.1 setuptools/58.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.12

File hashes

Hashes for flake8_spellcheck-0.26.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 78be6dd8b1dd91f8a6ad0cf36dcfee7851b3faed97842ef9a138021743e67bea
MD5 0579221c01c7c9a9e59a5d032afc834e
BLAKE2b-256 ee3f31af453d91ac728d369a7307210f3d97163ed5348d6020b74aeb31dbbf65

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