This project is an uncompromising, deterministic code formatter for Python. It functions by parsing source code into an abstract syntax tree and regenerating it according to a rigid, opinionated set of style rules. By automating the formatting process, it eliminates manual style debates and configuration overhead, ensuring that code remains consistent across entire projects regardless of the original input.
The tool distinguishes itself through its focus on speed and seamless integration into development workflows. It utilizes content-based file caching and parallel processing to maintain high performance on large codebases, while supporting version control hooks to enforce style consistency before code is committed. To preserve project history, it provides mechanisms to ignore specific commits in version control blame tracking, ensuring that automated style changes do not obscure original authorship.
Beyond standard source files, the formatter extends its capabilities to include Jupyter notebooks, type stubs, and embedded code examples within documentation. It offers broad compatibility through plugins for major text editors and integrated development environments, as well as support for the language server protocol. Configuration is managed through project-level files that are automatically discovered within the directory hierarchy, allowing for consistent behavior across diverse development environments.