-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from algorandfoundation/python-devxp
chore: Added Python VS Code configuration
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"charliermarsh.ruff", | ||
"tamasfe.even-better-toml", | ||
"editorconfig.editorconfig", | ||
"matangover.mypy", | ||
"DragMZ.teal" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
// General - see also /.editorconfig | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
// Don't want to use isort because it conflicts with Ruff - see run on save below | ||
"source.organizeImports": true, | ||
"source.fixAll": true | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
".mypy_cache": true, | ||
".pytest_cache": true, | ||
".ruff_cache": true, | ||
"**/__pycache__": true, | ||
".idea": true | ||
}, | ||
|
||
// Python | ||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv", | ||
"python.analysis.extraPaths": ["${workspaceFolder}/src"], | ||
"[python]": { | ||
"editor.defaultFormatter": "charliermarsh.ruff" | ||
}, | ||
"python.analysis.typeCheckingMode": "basic", | ||
"ruff.enable": true, | ||
"ruff.lint.run": "onSave", | ||
"ruff.lint.args": ["--config=pyproject.toml"], | ||
"ruff.importStrategy": "fromEnvironment", | ||
"ruff.fixAll": true, //lint and fix all files in workspace | ||
"ruff.organizeImports": true, //organize imports on save | ||
"ruff.codeAction.disableRuleComment": { | ||
"enable": true | ||
}, | ||
"ruff.codeAction.fixViolation": { | ||
"enable": true | ||
}, | ||
|
||
"mypy.configFile": "pyproject.toml", | ||
// set to empty array to use config from project | ||
"mypy.targets": [], | ||
"mypy.runUsingActiveInterpreter": true, | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
|
||
"python.testing.pytestArgs": ["."] | ||
} |