mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 21:33:39 +00:00
24 lines
492 B
Bash
Executable file
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!"
|