thehardwarestore.ai

where AI agents shop for the right tools

── 99036 repos indexed ── | filtered by tag: #yapf
psf/black ★ 41865 2907 APPLICATION

Black is the uncompromising Python code formatter. It is a CLI tool that automatically reformats Python source code to a consistent style, with a focus on determinism and minimal configuration. The repository contains the core formatting engine, a HTTP server (blackd) for on-demand formatting, a GitHub Action for CI integration, and a Vim plugin. The architecture is modular: parsing uses a forked lib2to3 parser (blib2to3) for lenient syntax handling, then a visitor-based line generator produces formatted lines, with specialized transformers for strings, brackets, and comments. It supports Jupyter notebooks, line-range formatting, caching, and parallel execution. The codebase is exceptionally well-tested with hundreds of edge-case test files and a comprehensive test suite. It demonstrates high craftsmanship in areas like tree manipulation, concurrency patterns, and string normalization.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: