Ruff Settings in VS Code

为了 fix on save{ "[toml]": { "editor.formatOnSave": false }, "ruff.lint.select": [ "I" ], "[python]": { ...

为了 fix on save

{
    "[toml]": {
        "editor.formatOnSave": false
    },
    "ruff.lint.select": [
        "I"
    ],
    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff",
        "editor.codeActionsOnSave": {
            "source.fixAll.ruff": "always"
        }
    }
}

可以用作 py 项目的 setup template