
Python Type Hint
如何ctrl+s保存时格式化,推荐安装yapf包 (flake8貌似不支持有类型注解的)1.安装yapf包:pip install yapf
2.在vscode中设置中搜索python
3.打开settings.json文件,添加如下代码
{
…,
“python.formatting.provider”: “yapf”,
“editor.formatOnSave”: true,
}
欢迎分享,转载请注明来源:内存溢出

Python Type Hint
如何ctrl+s保存时格式化,推荐安装yapf包 (flake8貌似不支持有类型注解的)1.安装yapf包:pip install yapf
2.在vscode中设置中搜索python
3.打开settings.json文件,添加如下代码
{
…,
“python.formatting.provider”: “yapf”,
“editor.formatOnSave”: true,
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)