diff --git a/.devcontainer/Python 3.11/devcontainer.json b/.devcontainer/Python/devcontainer.json similarity index 85% rename from .devcontainer/Python 3.11/devcontainer.json rename to .devcontainer/Python/devcontainer.json index a09f809f..ff713bc6 100644 --- a/.devcontainer/Python 3.11/devcontainer.json +++ b/.devcontainer/Python/devcontainer.json @@ -1,19 +1,15 @@ // 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 { - "name": "Python 3.11", + "name": "Python", // 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": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "pip3 install --user -r requirements-dev.txt", - // Configure tool-specific properties. "customizations": { "vscode": { @@ -23,12 +19,12 @@ "GitHub.vscode-pull-request-github", "hbenl.vscode-test-explorer", "redhat.vscode-xml", - "ninoseki.vscode-pylens", - "ms-python.black-formatter" + "ninoseki.vscode-mogami", + "ms-python.black-formatter", + "ms-python.flake8" ] } } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 1f522373..80d5d043 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,5 @@ { "editor.formatOnSave": true, - "python.formatting.provider": "black", - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, "python.testing.pytestEnabled": true, "python.analysis.diagnosticMode": "workspace", "files.associations": { @@ -13,4 +9,9 @@ "connectionId": "jellyfin", "projectKey": "jellyfin_jellyfin-kodi" }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "flake8.importStrategy": "fromEnvironment", + "black-formatter.importStrategy": "fromEnvironment", } diff --git a/requirements-dev.txt b/requirements-dev.txt index af40f310..5f37e165 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,6 +16,7 @@ coverage >= 5.2 flake8 >= 3.8 flake8-import-order >= 0.18 websocket-client >= 1.6.4 +black >= 24.4.2 types-requests >= 2.31 types-PyYAML >= 6.0