pep8-naming

0.15.1 · active · verified Fri Apr 10

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.

Warnings

Install

Imports

Quickstart

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

view raw JSON →