{"id":2661,"library":"pep8-naming","title":"pep8-naming","description":"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.","status":"active","version":"0.15.1","language":"en","source_language":"en","source_url":"https://github.com/PyCQA/pep8-naming","tags":["linter","code quality","flake8-plugin","pep8","naming-conventions"],"install":[{"cmd":"pip install pep8-naming","lang":"bash","label":"Install pep8-naming"}],"dependencies":[{"reason":"pep8-naming is a plugin for flake8 and requires it to function.","package":"flake8","optional":false},{"reason":"May be a transitive or environment-specific dependency for Flake8 plugins.","package":"flake8-polyfill","optional":true}],"imports":[{"note":"The functionality is integrated when flake8 is run, provided pep8-naming is installed in the same environment.","symbol":"pep8-naming (plugin)","correct":"pep8-naming is a flake8 plugin and is not typically imported directly into user code."}],"quickstart":{"code":"# 1. Install flake8 and pep8-naming\npip install flake8 pep8-naming\n\n# 2. Create a Python file (e.g., my_module.py) with a naming violation\n# For example, a class name that doesn't use CapWords\n# class myClass:\n#    pass\n\n# 3. Run flake8 from your terminal in the directory containing the file\n# flake8 my_module.py\n\n# Example output for 'class myClass:' might include N801:\n# my_module.py:1:7: N801 class names should use CapWords convention","lang":"bash","description":"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."},"warnings":[{"fix":"Ensure your Python environment meets the 'requires_python' specification for the installed pep8-naming version. Upgrade Python if necessary.","message":"Python version compatibility has changed across major releases. For example, version 0.15.0 dropped support for Python 3.8 and added support for Python 3.13. The current version (0.15.1) requires Python >=3.9.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Upgrade your flake8 installation to version 5.0.0 or later: `pip install --upgrade flake8`.","message":"The minimum required version of flake8 has increased. As of pep8-naming 0.13.3, flake8 5.0.0 or later is formally required. Using an older flake8 version may lead to installation issues or unexpected behavior.","severity":"breaking","affected_versions":">=0.13.3"},{"fix":"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.","message":"The behavior of the N808 check for type variable names was updated in 0.15.0 to require `CapWords` convention and optional suffixes (`_co` or `_contra`). Version 0.15.1 further refined this to allow type variable names to start with an underscore. This might cause new N808 errors in existing code.","severity":"gotcha","affected_versions":">=0.15.0"},{"fix":"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.","message":"The `--ignore-names` option only applies to a specific subset of naming errors (N802, N803, N804, N805, N806, N815, and N816). Other naming conventions, such as N801 for class names, cannot be ignored using this option.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}