yapf
« Back to VersTracker
Description:
Formatter for python code
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: python formatter linter code-quality pep8
Install: brew install yapf
About:
YAPF (Yet Another Python Formatter) is a Python code formatter that enforces consistent styling according to PEP 8 and other configurable standards. It automatically reformats code to maximize readability and minimize diffs, ensuring a uniform codebase across teams. It is highly customizable, allowing teams to define their own style guides or adopt existing ones like Google or Facebook styles.
Key Features:
  • Enforces PEP 8 and custom style guides
  • Minimizes diffs during code reformatting
  • Highly configurable style settings
  • Supports Google, Facebook, and PEP 8 styles
  • Command-line interface for easy integration
Use Cases:
  • Standardizing code style across a development team
  • Automating code formatting in CI/CD pipelines
  • Refactoring legacy Python code to meet modern style standards
Alternatives:
  • Black – Opinionated formatter with fewer configuration options, focusing on 'uncompromising' style.
  • autopep8 – Automatically formats Python code to conform to the PEP 8 style guide with minimal configuration.
  • Ruff – Extremely fast linter and formatter written in Rust, offering broader functionality beyond formatting.
Version History
Detected Version Rev Change Commit
Nov 13, 2024 9:19pm 0 VERSION_BUMP e23d8562