Skip to content

Commit

Permalink
Merge pull request #44 from hudsonbrendon/feat/pre-commit
Browse files Browse the repository at this point in the history
feat: add pre-commit in project
  • Loading branch information
hudsonbrendon authored Jan 7, 2025
2 parents ca602ea + e041c9a commit 06bf671
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 06bf671

Please sign in to comment.