From fe3c2ee280eb74421b225795bbb1b9b0a6dbcf70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 01:46:55 +0000 Subject: [PATCH 1/6] Update vscode settings file --- .vscode/settings.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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", } From 394c5eae5436000d52a2921593fd6c17f9a2f794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 01:47:46 +0000 Subject: [PATCH 2/6] Add flake8 to devcontainer extensions --- .devcontainer/Python 3.11/devcontainer.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Python 3.11/devcontainer.json b/.devcontainer/Python 3.11/devcontainer.json index a09f809f..49c499bf 100644 --- a/.devcontainer/Python 3.11/devcontainer.json +++ b/.devcontainer/Python 3.11/devcontainer.json @@ -4,16 +4,12 @@ "name": "Python 3.11", // 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", - // 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": { @@ -24,11 +20,11 @@ "hbenl.vscode-test-explorer", "redhat.vscode-xml", "ninoseki.vscode-pylens", - "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. // "remoteUser": "root" } From 703f8123b70451bf933a7c59438e75f4be965137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 01:48:59 +0000 Subject: [PATCH 3/6] Move devcontainer file --- .devcontainer/{Python 3.11 => Python}/devcontainer.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .devcontainer/{Python 3.11 => Python}/devcontainer.json (100%) diff --git a/.devcontainer/Python 3.11/devcontainer.json b/.devcontainer/Python/devcontainer.json similarity index 100% rename from .devcontainer/Python 3.11/devcontainer.json rename to .devcontainer/Python/devcontainer.json From d37159d20ba8908a7f66408cbed2e15a5eacd801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 01:49:45 +0000 Subject: [PATCH 4/6] Update devcontainer to py3.12 --- .devcontainer/Python/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Python/devcontainer.json b/.devcontainer/Python/devcontainer.json index 49c499bf..3998a419 100644 --- a/.devcontainer/Python/devcontainer.json +++ b/.devcontainer/Python/devcontainer.json @@ -1,9 +1,9 @@ // 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. From 684fb15c900eb79924420f5025136032a7b4df9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 02:05:07 +0000 Subject: [PATCH 5/6] Add black to dev requirements --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) 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 From 62a1de7879c37accca1724979095d569eb225b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Wed, 12 Jun 2024 02:13:14 +0000 Subject: [PATCH 6/6] Swap out deprecated python dependency helper --- .devcontainer/Python/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Python/devcontainer.json b/.devcontainer/Python/devcontainer.json index 3998a419..ff713bc6 100644 --- a/.devcontainer/Python/devcontainer.json +++ b/.devcontainer/Python/devcontainer.json @@ -19,7 +19,7 @@ "GitHub.vscode-pull-request-github", "hbenl.vscode-test-explorer", "redhat.vscode-xml", - "ninoseki.vscode-pylens", + "ninoseki.vscode-mogami", "ms-python.black-formatter", "ms-python.flake8" ]