chore(precommit): run pytest on pre-push, match CI fully#71
Merged
madtank merged 1 commit intodev/stagingfrom Apr 18, 2026
Merged
chore(precommit): run pytest on pre-push, match CI fully#71madtank merged 1 commit intodev/stagingfrom
madtank merged 1 commit intodev/stagingfrom
Conversation
Mirrors CI's three checks (ruff check, ruff format --check, pytest) so lint-only failures like PR #70's channel.py format miss get caught locally before push. Pytest runs at pre-push stage to keep everyday commits fast. Setup now: pip install pre-commit pre-commit install --install-hooks # installs both pre-commit and pre-push Verified: ruff check, ruff format, pytest tests/ all pass via `pre-commit run --all-files` and `... --hook-stage pre-push`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytest tests/hook at thepre-pushstage so the full CI bar (ruff check + ruff format --check + pytest) is enforced locally before anything hits origin.default_install_hook_types: [pre-commit, pre-push]so a singlepre-commit install --install-hookswires up both stages.Why
PR #70's lint failure (
ruff format --checkcaughtax_cli/commands/channel.py) is exactly the class of regression the existing hooks were supposed to prevent — but hooks were never installed locally for that worktree. Making install one command and extending coverage to tests closes the gap.Test plan
pre-commit run --all-files→ ruff check + ruff format Passedpre-commit run --all-files --hook-stage pre-push→ all three Passed🤖 Generated with Claude Code