pycodestyle checks Python source against selected PEP 8 style conventions. It reports line-specific issues and supports plugins and parseable editor output.
Overview
Formerly distributed as pep8, pycodestyle enforces a subset of PEP 8 formatting and import style rules. It is distributed as a small standard-library-based checker suitable for local runs and CI.
The CLI can show source context, cite relevant PEP 8 passages, aggregate statistics, and emit error codes editors can jump to. A plugin architecture allows additional checks beyond the core rule set.
Installation is via pip; Debian and Ubuntu packages may exist but are not always current. The tool complements other Python quality utilities and is commonly integrated with flake8 as a plugin.
Documentation covers configuration, error codes, API usage for embedding checks, and related tools.
Key features
- PEP 8 style rule checking
- Parseable error output
- Plugin architecture
- Show source and PEP excerpts
- Statistics mode
- Single-file minimal deployment
- pip installation
- Documented error codes
Use cases
- Local PEP 8 compliance checks
- Editor-integrated style feedback
- CI style gates
- flake8 plugin baseline