autopep8
Format Python code according to the PEP 8 style guide. More information: https://github.com/hhatto/autopep8.
- Format a file to
stdout, with a custom maximum line length:
autopep8 --max-line-length
- Format a file, displaying a diff of the changes:
autopep8 --diff
- Format a file in-place and save the changes:
autopep8 --in-place
- Recursively format all files in a directory in-place and save changes:
autopep8 --in-place --recursive
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
