diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7810f84..34ebb24 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,7 +6,23 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN python -m pip install --upgrade homeassistant colorlog black pylint numpy hassil av go2rtc-client zeroconf async-upnp-client pyserial aiodhcpwatcher PyTurboJPEG homeassistant-frontend aiodiscover ha-ffmpeg home-assistant-intents mutagen +RUN python -m pip install --upgrade \ + homeassistant \ + colorlog \ + ruff \ + numpy \ + hassil \ + av \ + go2rtc-client \ + zeroconf \ + async-upnp-client \ + pyserial \ + aiodhcpwatcher \ + PyTurboJPEG \ + aiodiscover \ + ha-ffmpeg \ + home-assistant-intents \ + mutagen RUN cd && mkdir -p /config/custom_components diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..016389d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +default_language_version: + python: python3.13 +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-toml + - id: check-yaml + - id: check-xml + - id: check-json + - id: check-added-large-files + - id: end-of-file-fixer + - id: trailing-whitespace + - id: debug-statements + - id: mixed-line-ending + - id: detect-private-key + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.1.2 + hooks: + - id: ruff + args: + - --fix + - id: ruff-format