Created
April 27, 2023 06:50
-
-
Save benoit74/0bf067fcf6d2068ece1bff0aef451376 to your computer and use it in GitHub Desktop.
Visual Studio Code settings for Python with black, isort and flake8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"[python]": { | |
"editor.defaultFormatter": "ms-python.black-formatter", | |
"editor.formatOnSave": true, | |
"editor.codeActionsOnSave": { | |
"source.organizeImports": true | |
}, | |
}, | |
"isort.args": [ | |
"--profile", | |
"black" | |
], | |
"python.formatting.provider": "none", | |
"python.formatting.blackPath": "/Users/benoit/.pyenv/shims/black", | |
"git.openRepositoryInParentFolders": "always", | |
"flake8.args": ["--max-line-length=88"], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To be placed in your project folder in
.vscode/settings.json
Works well only with Visual Studio Code extensions "Black Formatter", "isort" and "Flake8"
Replace
/Users/benoit/.pyenv/shims/black
with the path to your black installation, not really clear for me why I had to do this 😄