Skip to content

chore: repair scripts/setup and align local tooling with the uv workflow - #69

Merged
roquerodrigo merged 1 commit into
mainfrom
chore/dev-tooling
Aug 7, 2026
Merged

chore: repair scripts/setup and align local tooling with the uv workflow#69
roquerodrigo merged 1 commit into
mainfrom
chore/dev-tooling

Conversation

@roquerodrigo

Copy link
Copy Markdown
Owner

Summary

Local developer tooling had drifted from the uv-based workflow the repo actually uses:

  • scripts/setup ran pip install --requirement requirements.txt, a file that no longer exists — the script (and the devcontainer, which runs it as postCreateCommand) has been broken since the migration to uv.
  • The pre-commit ruff hook pinned a mirror rev behind the ruff version in pyproject.toml, so a local commit could format differently from CI, and no mypy hook existed.
  • The devcontainer still carried the upstream template's name.

Changes

  • scripts/setup now runs uv sync --group dev --group lint.
  • .pre-commit-config.yaml switches to local uv run hooks (ruff format, ruff check --fix, mypy) so the hook always uses the exact versions pinned in pyproject.toml; the file-hygiene hooks stay. The stale comment pointing at a nonexistent lint.yml workflow now points at ci.yml.
  • .devcontainer.json installs uv via a devcontainer feature and is renamed to roquerodrigo/ha-ttlock-ble.

Verification

Full lint + mypy + test suite green (262 passed, coverage 100%).

scripts/setup still ran pip against a requirements.txt that no longer
exists since the migration to uv, which also broke the devcontainer's
postCreateCommand. It now runs uv sync with the dev and lint groups,
and the devcontainer installs uv and drops the template's leftover name.

The pre-commit hooks move to local uv run commands so they always use
the exact ruff pinned in pyproject.toml instead of a drifting mirror
rev, and a mypy hook now runs the same strict check as CI.
@roquerodrigo
roquerodrigo merged commit a984db9 into main Aug 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant