Skip to content

Using Black In Vscode To Automatically Format Codestyle

Using Black to Automatically format codestyle#

Black is an opinionated code formatter for python. It isn’t a linter as it does not suggest, it just makes your code fit the style.

To set it up on vscode, open your project settings and add:

{
    "python.formatting.provider": "black",
    "editor.formatOnSave": true
}

Now whenever you save, your code will be formatted.

Source#