Registry / testing / pep8-naming

pep8-naming

JSON →
library0.15.1pypypi✓ verified 31d ago

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-naming
INSTALL
IMPORT
SIG · PEP8-NAMING
P
pep8-naming
testingpythonv0.15.1
Install
1.8s avg
Import
—
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.15.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pep8-naming (plugin)
✓ pep8-naming is a flake8 plugin and is not typically imported directly into user code.
The functionality is integrated when flake8 is run, provided pep8-naming is installed in the same environment.

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.

# 1. Install flake8 and pep8-naming pip install flake8 pep8-naming # 2. Create a Python file (e.g., my_module.py) with a naming violation # For example, a class name that doesn't use CapWords # class myClass: # pass # 3. Run flake8 from your terminal in the directory containing the file # flake8 my_module.py # Example output for 'class myClass:' might include N801: # my_module.py:1:7: N801 class names should use CapWords convention
Debug
Known issues
breakingPython 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.
fix
Ensure your Python environment meets the 'requires_python' specification for the installed pep8-naming version. Upgrade Python if necessary.
affects: >=0.14.0
breakingThe 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.
fix
Upgrade your flake8 installation to version 5.0.0 or later: `pip install --upgrade flake8`.
affects: >=0.13.3
gotchaThe 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.
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.
affects: >=0.15.0
gotchaThe `--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.
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.
affects: *
Upgrade
Version history
0.15.1latest on PyPI · released May 5, 2025
Audit
Dependencies
flake8requiredpep8-naming is a plugin for flake8 and requires it to function.
flake8-polyfilloptionalMay be a transitive or environment-specific dependency for Flake8 plugins.
Agent activity
4 hits · last 30 days
node
4
Resources