Skip to main content

YAPF

code quality

Links

YAPF (Yet Another Python Formatter) is a Python code formatter developed by Google. It automatically formats Python code to conform to a specified style guide, aiming to produce code that looks as if a human wrote it while strictly adhering to the style guide. YAPF is inspired by clang-format and automates the process of formatting Python code.

oaicite:0


Usage Example

To format a Python file using YAPF, run the following command:

yapf -i your_script.py

This command formats your_script.py in place, modifying the file to adhere to the specified style guide.

oaicite:1