Run prek only on changed files in agent instructions (#190786)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Abílio Costa
2026-11-06 15:11:24 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 0fc94261d9
commit 0d346674ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ This repository contains the core of Home Assistant, a Python 3 based home autom
- Run "python3" in current virtual environment to ensure the correct Python version is used for testing.
- When entering a new environment or worktree, run `script/setup` to set up the virtual environment with all development dependencies (pylint, pre-commit hooks, etc.). This is required before committing. If uv reports that no download was found for the required Python version, the environment is running an outdated version of uv; upgrade it with `curl -LsSf https://astral.sh/uv/install.sh | sh` and run `script/setup` again.
- .vscode/tasks.json contains useful commands used for development.
- After finishing a code session, run `uv run --no-sync prek run --all-files` to check for linting and formatting issues.
- After finishing a code session, run `base=$(git merge-base HEAD dev) && uv run --no-sync prek run --files $(git diff --name-only --diff-filter=d "$base"; git ls-files --others --exclude-standard)` to check the files changed on the branch (committed, uncommitted and untracked) for linting and formatting issues.
## Python Syntax Notes