Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pre-commit in project #44

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading