YAPF 是 Google 开发的一个用来格式化 Python 代码的工具。
使用方法:
usage: yapf [-h] [--style STYLE] [-d | -i] [-l START-END | -r] ...
Formatter for Python code.
positional arguments:
files
optional arguments:
-h 查看帮助
--style specify formatting style: either a style name (forexample "pep8" or "google"), or the name of a file] with style settings
-d print the diff for the fixed source
-i 直接修改源文件
-l START-END, --lines START-END range of lines to reformat, one-based
-r, --recursive run recursively over directories