diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4f3a7a9..c449dbe 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,8 @@ // See https://aka.ms/vscode-remote/devcontainer.json for format details. { "name": "Home Assistant integration development", - "image": "mcr.microsoft.com/devcontainers/python:1-3.13-bullseye", - "postCreateCommand": "sudo apt-get update && sudo apt-get install libturbojpeg0 libpcap0.8 -y", + "image": "mcr.microsoft.com/devcontainers/python:1-3.13-bookworm", + "postCreateCommand": "scripts/setup", "postAttachCommand": "scripts/setup", "forwardPorts": [8123], "customizations": { @@ -26,7 +26,10 @@ "editor.codeActionsOnSave": { "source.organizeImports": "always" }, - "files.trimTrailingWhitespace": true + "files.trimTrailingWhitespace": true, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + } } } }, diff --git a/scripts/setup b/scripts/setup index 5a9311f..3b556ee 100755 --- a/scripts/setup +++ b/scripts/setup @@ -1,5 +1,7 @@ #!/usr/bin/env bash +sudo apt-get update && sudo apt-get install libturbojpeg0 libpcap0.8 -y + set -e cd "$(dirname "$0")/.."