mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Home Assistant's hassfest validation requires config flows to be defined in a file named config_flow.py (not a package directory). Changes: - Renamed custom_components/tibber_prices/config_flow/ → config_flow_handlers/ - Created config_flow.py as bridge file re-exporting from config_flow_handlers/ - Updated all import paths across 5 files (user_flow, options_flow, subentry_flow, etc.) - Added ./scripts/hassfest for local validation (JSON/Python syntax, required files) - Added ./scripts/clean with three modes (--minimal, normal, --deep) - Refactored develop/lint/lint-check to use centralized cleanup (DRY principle) - Updated documentation in AGENTS.md and docs/development/ Technical details: - Bridge file uses __all__ exports to maintain clean public API - hassfest script uses ast.parse() for syntax validation (no disk artifacts) - clean --minimal removes .egg-info only (silent, for automated scripts) - Dual pip/uv pip compatibility for package uninstallation Impact: Integration now passes hassfest validation. Local validation available via ./scripts/hassfest before pushing to GitHub. Cleanup logic centralized and DRY across all development scripts.
22 lines
444 B
Bash
Executable file
22 lines
444 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# script/lint-check: Check linting without making changes.
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [ -z "$VIRTUAL_ENV" ]; then
|
|
. "$HOME/.venv/bin/activate"
|
|
fi
|
|
|
|
echo "==> Checking code format..."
|
|
uv run --active ruff format . --check
|
|
|
|
echo "==> Checking code with Ruff..."
|
|
uv run --active ruff check .
|
|
|
|
# Clean up any accidental package installation from uv run
|
|
"$(dirname "$0")/clean" --minimal
|
|
|
|
echo "==> Linting check completed!"
|