120 lines
2.9 KiB
Text
120 lines
2.9 KiB
Text
{
|
|
"folders": [
|
|
{
|
|
"path": "."
|
|
}
|
|
],
|
|
"settings": {
|
|
// Python environment
|
|
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe",
|
|
"python.terminal.activateEnvironment": true,
|
|
|
|
// Editor
|
|
"editor.formatOnSave": true,
|
|
"editor.rulers": [100],
|
|
"editor.tabSize": 4,
|
|
|
|
// Ruff (linter + formatter)
|
|
"[python]": {
|
|
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
"editor.formatOnSave": true,
|
|
"editor.codeActionsOnSave": {
|
|
"source.fixAll.ruff": "explicit",
|
|
"source.organizeImports.ruff": "explicit"
|
|
}
|
|
},
|
|
|
|
// Pylance / Pyright
|
|
"python.analysis.typeCheckingMode": "basic",
|
|
"python.analysis.autoImportCompletions": true,
|
|
"python.analysis.indexing": true,
|
|
|
|
// Test discovery
|
|
"python.testing.pytestEnabled": true,
|
|
"python.testing.unittestEnabled": false,
|
|
"python.testing.pytestArgs": ["tests"],
|
|
|
|
// File associations
|
|
"files.associations": {
|
|
"*.env.example": "dotenv"
|
|
},
|
|
|
|
// Exclude noise from explorer
|
|
"files.exclude": {
|
|
"**/__pycache__": true,
|
|
"**/*.pyc": true,
|
|
"**/.mypy_cache": true,
|
|
"**/.ruff_cache": true,
|
|
"**/*.egg-info": true,
|
|
".venv": false
|
|
}
|
|
},
|
|
"extensions": {
|
|
"recommendations": [
|
|
"ms-python.python",
|
|
"ms-python.vscode-pylance",
|
|
"charliermarsh.ruff",
|
|
"ms-python.mypy-type-checker",
|
|
"tamasfe.even-better-toml",
|
|
"mikestead.dotenv"
|
|
]
|
|
},
|
|
"launch": {
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "Python: Current File",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"program": "${file}",
|
|
"console": "integratedTerminal",
|
|
"justMyCode": true
|
|
}
|
|
]
|
|
},
|
|
"tasks": {
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Install (editable)",
|
|
"type": "shell",
|
|
"command": "pip install -e \".[dev]\"",
|
|
"group": "build",
|
|
"presentation": { "reveal": "always" },
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Ruff: lint",
|
|
"type": "shell",
|
|
"command": "ruff check .",
|
|
"group": "test",
|
|
"presentation": { "reveal": "always" },
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Ruff: format",
|
|
"type": "shell",
|
|
"command": "ruff format .",
|
|
"group": "build",
|
|
"presentation": { "reveal": "always" },
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "mypy: type-check",
|
|
"type": "shell",
|
|
"command": "mypy agravity_client",
|
|
"group": "test",
|
|
"presentation": { "reveal": "always" },
|
|
"problemMatcher": ["$mypy"]
|
|
},
|
|
{
|
|
"label": "pytest",
|
|
"type": "shell",
|
|
"command": "pytest -v",
|
|
"group": { "kind": "test", "isDefault": true },
|
|
"presentation": { "reveal": "always" },
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
}
|
|
}
|