menu Chancel's blog
rss_feed
Chancel's blog
时来天地皆同力

VSCode使用Yapf格式化代码

作者:Chancel Yang, 时间:2022 May 26, 阅读:44

首先需要安装Yapf,如果是远程开发,则需要在远程的机器上安装

pip3 install yapf

接着在VS Code菜单栏按顺序选择 File->Preferences->Settings,然后搜索 Python Formatting Provider,选择Yapf

接着在第二行Yapf添加两个参数,如图所示

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]