安装
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')