Repository navigation
chore: enable safety rules and stricter type-ignore validation - #798
Conversation
|
👋 Hi @harshaadimulam22-creator — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Before starting an issue, check its sidebar for an assignee or a linked pull request. Either one means somebody is already on it; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
[Low impact] This PR appears safe to merge.
|
|
Hi maintainers, could you please review this PR when you have a chance? All CI checks are passing. This contribution is part of a course assignment due today, so I would appreciate a review or feedback if your schedule allows. I understand that review may take longer. Thank you for your time. |
|
Hi maintainers! My PR #798 has one approving review from Greptile, all 5 checks have passed, and GitHub reports no merge conflicts. However, merging is still blocked on my side. Could you please clarify whether human maintainer approval or any additional repository permission is required? This contribution is part of my course assignment, so I would really appreciate your guidance. Thank you! |
kstonekuan
left a comment
There was a problem hiding this comment.
lgtm, thanks for this!
Summary
Closes #789.
Enable the requested Ruff safety rules and reject malformed or unknown ty suppression comments in the root project and all three workspace examples. Fix the four resulting redundant lambda wrappers in the MediaPipe test doubles.
Why
The existing CI quality gate can enforce these checks with the locked tools. The Ruff selection now includes
PLE,LOG,PGH003,PGH004,PLW0108,PLC3002and the seven requested async rules (ASYNC210,ASYNC220,ASYNC221,ASYNC222,ASYNC230,ASYNC250,ASYNC251).The test changes pass
SimpleNamespaceorobjectdirectly instead of wrapping the same call in a lambda. Existing outcome tests still check sampled detector timestamps and the resulting hand-absence interval. No new tests of lint configuration or third-party behavior were added.Python 3.11 support, the five-day dependency-age guard, existing style exceptions and
uv.lockare unchanged. There is no production or stored-data behavior change.Validation
Tested on macOS with Python 3.13.9, locked Ruff 0.17.2 and ty 0.0.91.
Root commands:
uv sync --locked uv run --locked ruff check --fix uv run --locked ruff format uv run --locked ty check PATH="$PWD/.venv/bin:/tmp/darwin_arm64:$PATH" HFLOW_FFMPEG=/tmp/darwin_arm64/ffmpeg .venv/bin/python -m pytest -q -n 4 git diff --checkRuff, formatting, ty and whitespace checks passed. The root suite finished with 2599 passed, 47 skipped.
Each changed workspace example was synced into its own locked environment and checked with:
trainingextra installedFor the autoresearch type check, the same locked commands included
--extra training; its pytest result above used the base development environment.The Python-version matrix and opt-in network, Docker, bucket and model suites were not run.
Checklist
AI assistance
Codex assisted with the configuration changes, test-double cleanup and local validation.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.