pep8-naming is a plugin for flake8 that checks Python code against PEP 8 naming conventions. It is currently at version 0.15.1 and has a regular release cadence, with multiple releases per year addressing Python version compatibility and new checks.
pip install pep8-namingVerified import paths — ran on the pinned version, not inferred.
To quickly use pep8-naming, install it alongside flake8. Once installed, flake8 will automatically detect and use the pep8-naming plugin when run against your Python code.
Ensure your Python environment meets the 'requires_python' specification for the installed pep8-naming version. Upgrade Python if necessary.
Upgrade your flake8 installation to version 5.0.0 or later: `pip install --upgrade flake8`.
Review and update type variable names to adhere to the `CapWords` convention, with optional `_co` or `_contra` suffixes. If using a leading underscore, ensure you are on version 0.15.1 or newer.
Be aware of which error codes `--ignore-names` impacts. For other naming violations, consider using `# noqa` comments on specific lines or adjusting your code to conform to PEP 8.