Skip to content

Commit

Permalink
chore: add VSCode configuration files for Python development
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jan 22, 2025
1 parent 20d4139 commit 7a3d326
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 30 deletions.
44 changes: 44 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"subProcess": true,
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
{
"name": "Python: Module",
"type": "python",
"request": "launch",
"module": "enter-your-module-name-here",
"console": "integratedTerminal"
},
{
"name": "Python: Current File (External Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
}
]
}
57 changes: 27 additions & 30 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
{
"python.autoComplete.extraPaths": [
"."
],
"python.analysis.extraPaths": [
"."
],
"python.pythonPath": "venv/bin/python",
"python.defaultInterpreterPath": "venv/bin/python",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"python.linting.pylintEnabled": true,
"files.eol": "\n", // Unix
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length=100"
],
"python.sortImports.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
//"source.fixAll": true,
//"source.organizeImports": true
}
},
}
"python.autoComplete.extraPaths": [
"."
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
"args": ["--cd=."]
}
},
"terminal.integrated.env.windows": {
"VIRTUAL_ENV": "${workspaceFolder}/.venv"
},
"files.eol": "\n", // Unix
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.formatOnSave": false,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
],
"python.analysis.extraPaths": [
"."
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Lint",
"type": "shell",
"command": ". ./activate.sh && ./lint.sh",
"group": "build",
"options": {
"cwd": "${workspaceRoot}"
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"clear": true
},
"problemMatcher": []
},
{
"label": "Tox",
"type": "shell",
"command": "tox",
"group": "build",
"options": {
"cwd": "${workspaceRoot}"
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"clear": true
},
"problemMatcher": []
},
]
}

0 comments on commit 7a3d326

Please sign in to comment.