VScode格式化python代码

  1. 在拓展中搜索"Black Formatter"并安装

  2. 在JSON(User) 文件中添加配置,打开settings.json并添加:

    "[python]": {
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.formatOnSave": true
    }

posted @ 2024-01-22 15:00  四十四  阅读(292)  评论(0编辑  收藏  举报