yapf installs statistics
By EeyoreLee · VS Code Marketplace · Programming Languages
Formatter support for python files using `yapf`.
yapf has 155,901 recorded installs on VS Code Marketplace, ranking #1815 of 2,502 tracked listings.
Rating: 5.00 / 5 from 7 ratings
About yapf
Vscode formatter extension support for python files using yapf
A formatter extension with support for python files and notebook cell. Feel free to open an issue to tell me what feature else do you need since it's a preview version.
Note:
- This extension is supported for all actively supported versions of the python language (i.e., python >= 3.10(EOL: 2026-10)).
This extension is also published on Open VSX.
Quick Start
Setting the following can enable this formatter quickly.
"[python]": {
"editor.formatOnSaveMode": "file",
"editor.formatOnSave": true,
"editor.defaultFormatter": "eeyore.yapf",
"editor.formatOnType": false
}
Usage
- Install
yapfpackage from pip in following. This is optional but recommended way, else it will use the bundledyapf=0.43.0
pip install yapf
- Select this fotmatter
eeyore.yapfby adding the following to your vscode settings
"[python]": {
"editor.defaultFormatter": "eeyore.yapf"
}
- Enable format on save by adding the following
"[python]": {
"editor.formatOnSave": true
}
Address crash for python3.9 or lower
Use yapf.interpreter property to select a python interpreter that 3.10 or higher to run this tool by subprocess
file mode & modifications mode
Choose the mode by the following
- Use file mode
"[python]": {
"editor.formatOnSaveMode": "file"
}
- Use modifications mode
"[python]": {
"editor.formatOnSaveMode": "modifications"
}
Format for notebook
- Format on cell execution
"notebook.formatOnCellExecution": true
- Format on save
"notebook.formatOnSave.enabled": true
Set your own yapf style
Note this setting has to be in the global scope of settings.json, not in a [python] block.
- Set style by the following vscode settings which is equal to
yapf --style '{based_on_style: pep8, indent_width: 2}'
"yapf.args": ["--style", "{based_on_style: pep8, indent_width: 2}"]
- Use a style file, like
.style.yapf,setup.cfg,pyproject.toml,~/.config/yapf/style. For details, see google/yapf
"yapf.args": ["--style", "/home/example/.yapf"]
Add extra magic function for jupyter
This extension supports the following magic functions by default
"capture",
"prun",
"pypy",
"python",
"python3",
"time",
"timeit"
Other magic functions like %matplotlib inline, you need to add it to the yapf.cellMagics property.
"yapf.cellMagics": ["matplotlib inline"]
Description from the VS Code Marketplace listing.
- python
- yapf
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Ratings over time
Listing placement
Listing placement
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (6)Similar VS Code Marketplace Programming Languages plugins
All 20 yapf alternativesData source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=eeyore.yapf. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.