Repository navigation
Conversation
Bump the pinned dev dependencies to their newest releases at least a week old: pytest 9.1.1, ruff 0.16.10 and ty 0.0.84 (from 0.0.17). ruff 0.16 checks more rules by default. The fixes: - Optional[X] annotations become X | None (the package needs 3.11). - Each subprocess.run states check=: False where the caller reads the return code itself, True in tests where a failure should stop there. - typer.Argument and typer.Option count as immutable calls, so the documented typer signature style is not flagged as a mutable default. - browser_bridge_host.py loses its shebang; it is always run with python3 and is not executable. - Test imports are sorted and Generator comes from collections.abc.
AGENTS.md caps functions at cyclomatic complexity 8 and lines at 100 characters, but ruff checked neither. Enable C901 (max 8) and E501 (100; the formatter keeps its 88-column wrap) and shorten the three test lines that ran over. browser_bridge_host.py is exempt from C901 for now: its main() relays through closures at complexity 19, and the authenticated bridge rewrite replaces the file.
Nothing ran the checks before a commit: the repo had no hook config. .pre-commit-config.yaml runs ruff check, ruff format, ty and pytest through `uv run --extra dev`, so the versions pinned in pyproject are the ones that run, plus shellcheck on the shell scripts and image shims, gitleaks on staged changes, and actionlint and zizmor on workflow files. AGENTS.md covers `prek install`.
The repo had no CI. A GitHub Actions workflow now runs every prek hook on every file for pull requests and for pushes to master, with uv providing Python 3.13 and prek pinned to 0.5.4. The actions are pinned to commit SHAs, the token is read-only, checkout keeps no credentials, and a newer push cancels the run it supersedes. actionlint and zizmor (pedantic) report nothing.
git exports GIT_INDEX_FILE and similar variables to its hooks. Run from the new pre-commit hook, the tests' own git calls in temporary repos used this repo's index instead, and `git worktree add` failed. The autouse fixture now removes every inherited GIT_* variable.
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.
Adds prek hooks and a CI workflow, and updates the dev tools they run.
What it does
devextra. ruff 0.16 checks more rules by default; the code now usesX | Noneannotations, statescheck=on everysubprocess.run, and treatstyper.Argument/typer.Optionas immutable calls.browser_bridge_host.pyis exempt from C901 until the bridge rewrite replaces it..pre-commit-config.yaml): ruff check, ruff format, ty and pytest throughuv run --extra dev, plus shellcheck on the shell scripts and image shims, gitleaks on staged changes, and actionlint and zizmor on workflows..github/workflows/ci.yml): runs every prek hook on every file for pull requests and pushes to master. Actions are pinned to commit SHAs, permissions are read-only, checkout keeps no credentials, and a newer push cancels the run it supersedes.Test plan
prek run --all-filespasses locally (ruff, ruff format, ty, 340 tests, shellcheck, gitleaks, actionlint, zizmor)actionlintandzizmor --persona pedanticreport nothing for the workflow