macOS
brew install yapflocal Homebrew formula metadata
brew
Formatter for python code. Version 0.43.0 via Homebrew; verified from local package data.
install
brew install yapflocal Homebrew formula metadata
sudo apt install python3-yapfDebian stable package indexes · python3-yapf · source: deb.debian.org
nix profile install nixpkgs#yapfnixpkgs package indexes · yapf · source: raw.githubusercontent.com
sudo pacman -S yapfArch Linux sync databases · yapf · source: geo.mirror.pkgbuild.com
overview
Formatter for python code
history
YAPF, Yet Another Python Formatter, is Google's clang-format-inspired formatter for Python source. Unlike style checkers that only report or repair selected PEP 8 violations, YAPF searches for a low-cost layout that conforms to a chosen style and rewrites the file.
The Google-owned GitHub repository was created on 2015-03-18, and PyPI history shows public 0.1.x packages in April 2015. The README explicitly says YAPF is based on clang-format, developed by Daniel Jasper, and that its goal is to produce code as good as a programmer would write while following a style guide.
YAPF's design grew out of formatter culture rather than linter culture. Its README contrasts the project with tools that remove lint errors and emphasizes a configurable formatting engine with named styles such as pep8, google, yapf, and facebook plus many individual knobs. Later changelog entries show continued maintenance for newer Python syntax and packaging shifts, including the move away from lib2to3 toward blib2to3 for Python 3.11-era parsing.
YAPF became one of the main Python auto-formatters of the mid-2010s, especially for teams that wanted clang-format-style configurability instead of a single canonical layout. Its README documents editor integrations, recursive formatting, diff mode for CI checks, local style discovery, and ignore files, all of which match adoption through developer tooling, pre-submit checks, and editor save hooks.
The formatter's long-term place changed after Black popularized less-configurable formatting, but YAPF remained important where repositories wanted Google/Facebook-like styles, large configuration surfaces, or incremental compatibility with existing formatting policy.
Typical CLI usage is `yapf -i file.py` for in-place formatting, `yapf -d` for a diff suitable for review or CI, and `yapf -r` for recursive directory formatting. The `yapf-diff` helper fits patch-oriented workflows by formatting only changed hunks.
Configuration is central to YAPF usage. The formatter searches local style files such as `.style.yapf`, `setup.cfg`, and `pyproject.toml`, supports predefined base styles, and offers many style options for projects that treat formatting as policy rather than taste.
YAPF matters because it represents the configurable branch of Python formatter history: closer to clang-format and gofmt in automation, but less doctrinaire than later formatters. In package collections it is a standard example of a developer tool whose value is mostly in repeatability, editor integration, and reducing style churn in diffs.
It also shows how Python tooling had to adapt as the language parser story changed. Maintaining a formatter across Python syntax releases is partly a packaging problem: the executable must track language versions, config formats, editor plugins, and CI behavior at the same time.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
.style.yapfsetup.cfgpyproject.toml~/.config/yapf/style.yapfignoreexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
yapf | cli | global executable | |
yapf-diff | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/google/yapf
install metadata
| Package key | brew:yapf |
|---|---|
| Version | 0.43.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/yapf |
| Homepage | https://github.com/google/yapf |
| Repository | https://github.com/google/yapf |
| Upstream docs | https://github.com/google/yapf#readme |
| License | Apache-2.0 |
| Source archive | https://files.pythonhosted.org/packages/23/97/b6f296d1e9cc1ec25c7604178b48532fa5901f721bcf1b8d8148b13e5588/yapf-0.43.0.tar.gz |
| Dependencies | python@3.14 |
| Bottle | available (on all) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | yapf |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
python3-yapf 0.40.2-3
public modules for yapf (Python 3)
https://github.com/google/yapf
sudo apt install python3-yapfyapf3 0.40.2-3
Python code formatter for different styles (Python 3)
https://github.com/google/yapf
sudo apt install yapf3yapf
nix profile install nixpkgs#yapfpython3-yapf 0.33.0-1
public modules for yapf (Python 3)
https://github.com/google/yapf
sudo apt install python3-yapfyapf3 0.33.0-1
Python code formatter for different styles (Python 3)
https://github.com/google/yapf
sudo apt install yapf3yapf 0.43.0-2
Python style guide checker
https://github.com/google/yapf
sudo pacman -S yapfsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.