YAPFPython 代码格式化工具

联合创作 · 2023-10-02

YAPF 是 Google 开发的一个用来格式化 Python 代码的工具。

使用方法:

usage: yapf [-h] [--style STYLE] [-d | -i] [-l START-END | -r] ...

Formatter for Python code.

positional arguments:
  files

optional arguments:
  -h, --help            show this help message and exit
  --style STYLE         specify formatting style: either a style name (for
                        example "pep8" or "google"), or the name of a file
                        with style settings
  -d, --diff            print the diff for the fixed source
  -i, --in-place        make changes to files in place
  -l START-END, --lines START-END
                        range of lines to reformat, one-based
  -r, --recursive       run recursively over directories
浏览 6
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报