-
PEP8
PEP 8 – Style Guide for Python Code
PEP means Python Enhancement Proposals. 可以理解为Python相关的规范性建议文档,深入学习Python必读。
-
autopep8(github)
A tool that automatically formats Python code to conform to the PEP8 style guide.
autopep8 --in-place --aggressive --aggressive <filename>
-
flake8(github)
Flake8 is a wrapper around these tools:
- PyFlakes
- pycodestyle
- Ned Batchelder’s McCabe script
flake8 file.py
-
black(Document)
black, the uncompromising code formatter.
black {source_file_or_directory}
-
References
理解Python中PEP8、flake8、autopep8、black
最新推荐文章于 2024-04-20 15:12:20 发布