Skip to content

Instantly share code, notes, and snippets.

@vik-y
Created September 27, 2023 03:20
Show Gist options
  • Save vik-y/7d0acf8fbd59a000800781dc333457c2 to your computer and use it in GitHub Desktop.
Save vik-y/7d0acf8fbd59a000800781dc333457c2 to your computer and use it in GitHub Desktop.
VScode configuration that helps you write python code better!
{
"editor.formatOnSave": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"python.sortImports.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"python.linting.mypyArgs": [
"--follow-imports=silent",
"--ignore-missing-imports",
"--show-column-numbers"
]
}
{
"editor.formatOnSave": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Path": "autopep8",
"python.formatting.blackPath": "black",
"python.formatting.blackArgs": [
"--line-length",
"88"
],
"python.formatting.autopep8Args": [
"--aggressive",
"--aggressive",
"--max-line-length=88",
"--experimental",
],
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.sortImports.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"python.linting.mypyArgs": [
"--follow-imports=silent",
"--ignore-missing-imports",
"--show-column-numbers"
]
}
@vik-y
Copy link
Author

vik-y commented Sep 27, 2023

settings.json is what I have been using for a very long time and it works like a charm.

settings_experimental.json - has some new features which I am testing out - like automatically fixing linting errors, use autopep8 , etc. You can try that as well if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment