Skip to content

[Solved] How to rewrite my settings.json to use ruff as codefixer and black formattng rules? #7474

Answered by JonathanPlasse
simkimsia asked this question in Q&A
Discussion options

You must be logged in to vote
{
    "[python]": {
      "editor.defaultFormatter": "ms-python.black-formatter",
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
        "source.fixAll": "always",
      }
    },
    "ruff.args": ["--select=E,W,F,I001,PL", "--ignore=E203", "--per-file-ignores=**/__init__.py:F401"]
}

I invite you to read the Ruff documentation, and its VSCode extension for further details.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@simkimsia
Comment options

@JonathanPlasse
Comment options

@simkimsia
Comment options

@simkimsia
Comment options

@JonathanPlasse
Comment options

Answer selected by simkimsia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants