Merge pull request #881 from oddstr13/pr-vscode-devcontainer-1

Update devcontainer and vscode config
This commit is contained in:
Odd Stråbø 2024-06-12 05:08:13 +02:00 committed by GitHub
commit b6319e17f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 13 deletions

View File

@ -1,19 +1,15 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python // README at: https://github.com/devcontainers/templates/tree/main/src/python
{ {
"name": "Python 3.11", "name": "Python",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm", "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [], // "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements-dev.txt", "postCreateCommand": "pip3 install --user -r requirements-dev.txt",
// Configure tool-specific properties. // Configure tool-specific properties.
"customizations": { "customizations": {
"vscode": { "vscode": {
@ -23,12 +19,12 @@
"GitHub.vscode-pull-request-github", "GitHub.vscode-pull-request-github",
"hbenl.vscode-test-explorer", "hbenl.vscode-test-explorer",
"redhat.vscode-xml", "redhat.vscode-xml",
"ninoseki.vscode-pylens", "ninoseki.vscode-mogami",
"ms-python.black-formatter" "ms-python.black-formatter",
"ms-python.flake8"
] ]
} }
} }
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root" // "remoteUser": "root"
} }

View File

@ -1,9 +1,5 @@
{ {
"editor.formatOnSave": true, "editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.testing.pytestEnabled": true, "python.testing.pytestEnabled": true,
"python.analysis.diagnosticMode": "workspace", "python.analysis.diagnosticMode": "workspace",
"files.associations": { "files.associations": {
@ -13,4 +9,9 @@
"connectionId": "jellyfin", "connectionId": "jellyfin",
"projectKey": "jellyfin_jellyfin-kodi" "projectKey": "jellyfin_jellyfin-kodi"
}, },
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"flake8.importStrategy": "fromEnvironment",
"black-formatter.importStrategy": "fromEnvironment",
} }

View File

@ -16,6 +16,7 @@ coverage >= 5.2
flake8 >= 3.8 flake8 >= 3.8
flake8-import-order >= 0.18 flake8-import-order >= 0.18
websocket-client >= 1.6.4 websocket-client >= 1.6.4
black >= 24.4.2
types-requests >= 2.31 types-requests >= 2.31
types-PyYAML >= 6.0 types-PyYAML >= 6.0