flake8-spellcheck

raw JSON →
0.28.0 verified Fri May 01 auth: no python

A flake8 plugin to check spelling of variables, comments, docstrings, and more. Version 0.28.0, updated as recently as 2023. Releases are irregular.

pip install flake8-spellcheck
error 'flake8' is not installed
cause flak8-spellcheck depends on flake8 but does not install it automatically.
fix
Run 'pip install flake8 flake8-spellcheck'.
error No spelling errors found even though there are misspellings
cause Plugin not enabled; missing --enable-extensions=SC.
fix
Run 'flake8 --enable-extensions=SC yourfile.py'.
error ModuleNotFoundError: No module named 'flake8_spellcheck'
cause Users try to import the plugin directly instead of using flake8.
fix
Do not import the module; run flake8 as usual after installation.
gotcha Plugin must be enabled via --enable-extensions=SC or in configuration; just installing does nothing.
fix Add 'enable-extensions = SC' to flake8 configuration or pass --enable-extensions=SC.
deprecated The 'spellcheck' option in flake8 config is deprecated; use 'enable-extensions' instead.
fix Use 'enable-extensions = SC' in your flake8 config.
gotcha Word list may miss many technical terms; you must manage custom dictionaries or .spelling file.
fix Create a .spelling file in the project root with one word per line.

Configuration example for flake8-spellcheck. Use --enable-extensions=SC or add to config.

# Create a .flake8 file or add to setup.cfg:
# [flake8]
# enable-extensions = SC
# spellcheck = true
# Or run directly:
# flake8 --enable-extensions=SC --spellcheck yourfile.py