hass.tibber_prices/scripts/lint
Julian Pawlowski 8790ac8a41 fix
2025-11-03 21:13:50 +00:00

24 lines
492 B
Bash
Executable file

#!/bin/sh
# script/lint: Run linting tools and apply formatting
set -e
cd "$(dirname "$0")/.."
if [ -z "$VIRTUAL_ENV" ]; then
. "$HOME/.venv/bin/activate"
fi
echo "==> Running linting tools..."
echo "==> Running Ruff format..."
uv run --active ruff format .
echo "==> Running Ruff check..."
uv run --active ruff check . --fix
# Uninstall editable package to avoid conflicts with Home Assistant
pip uninstall -y tibber_prices >/dev/null 2>&1 || true
echo "==> Linting completed!"