Configure Ruff for VSCode (#10572)

This commit is contained in:
Avasam
2023-08-13 17:31:36 -04:00
committed by GitHub
parent 22b055a147
commit 3a376e7eaa
2 changed files with 8 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
{
"recommendations": [
"bierner.github-markdown-preview",
"charliermarsh.ruff",
"editorconfig.editorconfig",
"ms-python.black-formatter",
"ms-python.flake8",
@@ -30,8 +31,6 @@
"ms-python.autopep8",
// Not using pylint
"ms-python.pylint",
// Not using Ruff
"charliermarsh.ruff",
// VSCode has implemented an optimized version
"coenraads.bracket-pair-colorizer",
"coenraads.bracket-pair-colorizer-2",

View File

@@ -5,7 +5,6 @@
*
* Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use.
*/
// TODO: Add charliermarsh.ruff to unrecommended extensions
{
// Don't format on save for formatters we don't explicitely control
"editor.formatOnSave": false,
@@ -22,7 +21,8 @@
"pytype_exclude_list.txt": "properties"
},
"files.exclude": {
"**/.mypy_cache": true
"**/.*_cache": true, // mypy and Ruff cache
"**/__pycache__": true
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
@@ -48,6 +48,7 @@
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
// Allow isort or Ruff to organize imports
"source.organizeImports": true
}
},
@@ -110,6 +111,10 @@
"isort.check": true,
"isort.importStrategy": "fromEnvironment",
"black-formatter.importStrategy": "fromEnvironment",
"ruff.importStrategy": "fromEnvironment",
"ruff.fixAll": true,
// Conflict between Ruff and isort
"ruff.organizeImports": false,
"evenBetterToml.formatter.alignComments": false,
"evenBetterToml.formatter.alignEntries": false,
"evenBetterToml.formatter.allowedBlankLines": 1,