hhatto

hhatto/autopep8

Python MIT Dev Tools

A tool that automatically formats Python code to conform to the PEP 8 style guide.

4.7k stars
284 forks
active
GitHub

4.7k

Stars

284

Forks

131

Open issues

30

Contributors

v2.3.2 14 Jan 2025

AI Analysis

autopep8 automatically formats Python code to conform to PEP 8 style guidelines, using pycodestyle to identify formatting issues and fix them. It serves Python developers and teams who need consistent code style enforcement, particularly those adopting PEP 8 standards in existing codebases. It is not a linter that reports issues—it actively rewrites code—and is most valuable for teams standardizing legacy or inconsistent Python projects.

Dev Tools Developer Tool Discovery value: 3/10
Documentation 7/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 7/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

python-formatter code-style pep8 automation refactoring
Actively maintained MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1d ago

Mature PEP 8 formatter with 16 years of incremental refinement, now eclipsed but still actively maintained

autopep8 automatically corrects Python code style violations to conform to PEP 8. Created in 2010, it was a category leader before Black emerged as the opinionated formatter of choice. autopep8 remains maintained and deployed in legacy codebases and environments where configurability matters, but adoption has plateaued relative to Black and yapf. The project serves organizations with strict PEP 8 compliance requirements and teams preferring knob-based customization over formatter opinions.

Origin

autopep8 launched in 2010 as one of the first automated PEP 8 formatters, filling a gap before Black (2018) popularized opinionated, zero-config formatting. It uses pycodestyle to detect violations and applies fixes programmatically. The project reached maturity by ~2015 and has since operated in maintenance mode with steady incremental fixes.

Growth

Star growth peaked around 2015–2018 as Python ecosystem adoption accelerated. Plateaued post-2018 when Black launched and captured mindshare as the 'opinionated' formatter. Current trajectory shows slow, flat growth (0 stars gained in last 7 days as of 2026-07-09). The project remains stable rather than stagnant—active maintenance continues but innovation has slowed because the problem is largely solved and user preference has shifted to Black's philosophy.

In production

adoption not verified — README does not cite production deployments, enterprise users, or adoption surveys. No evidence in metadata of package download statistics or corporate backing. The project likely has legacy production usage given its age and maturity, but concrete adoption signals are not documented.

Code analysis
Architecture

Based on README: wraps pycodestyle for violation detection, applies fixes via AST/text manipulation. Supports aggressive levels (multiple -a flags) for non-whitespace changes and experimental fixes. Appears to use file-based configuration and parallel job support. Implementation details not verifiable from README alone.

Tests

README includes codecov badge linking to coverage reports, indicating CI/CD with coverage tracking. Specific coverage percentage not stated in truncated README.

Maintenance

Last push 2026-07-06 (3 days before analysis date). Build status badge indicates active CI/CD workflow. Recent activity confirms the project is maintained, not abandoned. However, commit frequency and issue resolution velocity cannot be determined from metadata alone. Maintenance appears reactive (fixes bugs/dependencies) rather than proactive (new features).

Honest verdict

ADOPT IF: you maintain legacy Python codebases that require PEP 8 compliance with granular control over fixes, have existing autopep8 configurations, or need configurability Black's opinionated stance doesn't allow. AVOID IF: starting a new project—Black or ruff are better defaults; if formatter speed is critical; or if you value minimal configuration. MONITOR IF: you're evaluating whether to migrate away from autopep8 to a newer formatter; the project is stable but unlikely to gain new features.

Independent dimensions

Mainstream potential

2/10

Technical importance

5/10

Adoption evidence

4/10

Risks
  • Adoption has plateaued; ecosystem mindshare is concentrated on Black, reducing community contributions and third-party integrations.
  • Configurability, while a strength, may introduce complexity and inconsistency if teams disagree on settings—Black's opinion avoids this cost.
  • No evidence of performance optimization; linters and formatters like ruff have shifted to Rust for speed, making Python-based autopep8 slower on large codebases.
  • Dependency on pycodestyle (maintained but not heavily developed); if pycodestyle stops evolving, autopep8 detection capabilities may lag.
  • Limited visibility into issue resolution and feature request backlog from public metadata; community engagement velocity unknown.
Prediction

autopep8 will remain in maintenance mode indefinitely, serving a diminishing cohort of legacy projects and teams with specific PEP 8 compliance workflows. Unlikely to regain market share or see significant feature expansion. Slow attrition as teams migrate to Black or ruff during codebase refresh cycles.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Python
99.3%
Makefile
0.7%
Shell
0%

Information

Language
Python
License
MIT
Last updated
4d ago
Created
189mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

psf

psf/black

Black is a deterministic Python code formatter that enforces a consistent style...

41.7k Python Dev Tools
google

google/yapf

YAPF is a Python code formatter developed by Google that automatically formats...

14k Python Dev Tools
wemake-services

wemake-services/wemake-python-styleguide

wemake-python-styleguide is a strict, opinionated flake8 plugin that enforces...

2.9k Python Dev Tools
pygments

pygments/pygments

Pygments is a mature, widely-used Python library for syntax highlighting across...

2.2k Python Dev Tools
python

python/peps

This is the official Python Enhancement Proposals (PEPs) repository, serving as...

5k reStructuredText Dev Tools
vs. alternatives
Black

Black (41,715 stars) is the dominant formatter due to zero-config design and strong opinions on style. Trades configurability for simplicity. autopep8 offers more granular control but requires setup and decision-making.

yapf

yapf (13,982 stars, Google-backed) also preserves code intent and offers style profiles. Similar configurability to autopep8 but larger community and corporate sponsorship. autopep8 predates yapf and competes on legacy adoption and simpler API.

ruff

ruff (Rust-based, emerging leader) combines linting and formatting at high speed. Gaining adoption rapidly as a Black alternative with better performance. autopep8 has no performance differentiation.

pylint / flake8

These are linters, not formatters. autopep8 complements them by fixing violations flake8/pycodestyle report. Not direct competitors but different tools in same workflow.