安装
pip install yapf
用法
from yapf.yapflib.yapf_api import FormatFile, FormatCode
FormatFile(file_name, in_place=True)
FormatCode('xxx',style_config='pep8')
pip install yapf
from yapf.yapflib.yapf_api import FormatFile, FormatCode
FormatFile(file_name, in_place=True)
FormatCode('xxx',style_config='pep8')
本文标题:python代码格式化工具
本文链接:https://www.haomeiwen.com/subject/pstrfftx.html
网友评论