Skip to content

Commit b39d8e8

Browse files
twsltimvink
authored andcommitted
Add devcontainer settings
1 parent e0d8312 commit b39d8e8

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

.devcontainer/devcontainer.json

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,59 @@
44
"name": "Python 3 (git-authors)",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"image": "mcr.microsoft.com/devcontainers/python:1-3.8-bullseye",
7-
87
// Features to add to the dev container. More info: https://containers.dev/features.
98
// "features": {},
10-
119
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1210
// "forwardPorts": [],
13-
1411
// Use 'postCreateCommand' to run commands after the container is created.
1512
// "postCreateCommand": "pip3 install --user -r requirements.txt",
16-
1713
// Configure tool-specific properties.
1814
"customizations": {
15+
"settings": {
16+
"editor.tabSize": 4,
17+
"editor.renderWhitespace": "all",
18+
"editor.formatOnPaste": false,
19+
"editor.formatOnSave": true,
20+
"editor.rulers": [
21+
120
22+
],
23+
"files.eol": "\n",
24+
"python.envFile": "${workspaceFolder}/.env",
25+
"python.languageServer": "Pylance",
26+
"python.analysis.autoImportCompletions": true,
27+
"python.analysis.completeFunctionParens": true,
28+
"python.analysis.autoFormatStrings": true,
29+
"python.analysis.inlayHints.variableTypes": true,
30+
"python.analysis.inlayHints.functionReturnTypes": true,
31+
"python.analysis.diagnosticMode": "workspace",
32+
"python.terminal.activateEnvironment": true,
33+
"python.testing.autoTestDiscoverOnSaveEnabled": false,
34+
"python.testing.unittestEnabled": false,
35+
"python.testing.pytestEnabled": true,
36+
"python.testing.cwd": "${workspaceFolder}",
37+
"python.testing.pytestArgs": [
38+
"tests",
39+
"-v"
40+
],
41+
"[python]": {
42+
"editor.formatOnType": true,
43+
"editor.defaultFormatter": "charliermarsh.ruff",
44+
"editor.codeActionsOnSave": {
45+
"source.organizeImports": "always",
46+
"source.organizeImports.ruff": "always",
47+
"source.fixAll.ruff": "always"
48+
}
49+
},
50+
"git.enableSmartCommit": true,
51+
"git.autofetch": true
52+
},
1953
"vscode": {
2054
"extensions": [
2155
"ms-python.python",
2256
"charliermarsh.ruff"
2357
]
2458
}
2559
}
26-
2760
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
2861
// "remoteUser": "root"
29-
}
62+
}

0 commit comments

Comments
 (0)