[Chore] satisfy pre-commit on rollout.py + vllm_engine.py (pre-existing lint debt) - #140
Merged
Conversation
…ng debt)
These are the only two files in the repo that fail the pre-commit gate
(ruff/autoflake/isort/black) on origin/main — confirmed repo-wide:
- ruff: only vime/ray/rollout.py:8 (F401 unused `argparse.Namespace`)
- autoflake:only vime/ray/rollout.py
- black: vime/ray/rollout.py + vime/backends/vllm_utils/vllm_engine.py
Apply the exact hook auto-fixes (ruff --fix, autoflake --remove-all-unused-imports,
isort --profile=black, black -l119), no functional change:
- rollout.py: drop unused `from argparse import Namespace` (zero refs); isort
blank-line separation between third-party and first-party; order two
deferred function-local imports (vllm_router before vime.*).
- vllm_engine.py: two blank lines before `class VLLMEngine` (E302/black).
Decoupled from the slime-sync PRs (#137/#138) on purpose: those two PRs each
touch one of these files, and the auto-fixing gate would reformat them on any
PR that does. Landing the debt once here keeps the sync PRs scoped to behavior.
Verified in vime-vllm cpu image: all four hooks pass on both files afterward;
py_compile clean; `Namespace` has no remaining references.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Contributor
There was a problem hiding this comment.
Code Review
This pull request performs minor code cleanup and formatting adjustments. It removes an unused Namespace import from argparse in vime/ray/rollout.py, reorders local imports within the _start_router function, and adds blank lines for improved code readability in both vime/ray/rollout.py and vime/backends/vllm_utils/vllm_engine.py. There are no review comments, and no further feedback is required.
CalvinXKY
approved these changes
Jun 3, 2026
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.
What
Mechanical pre-commit cleanup of two files that carry pre-existing lint debt on
main. Decoupled into its own PR (per maintainer request) so the functional sync PRs (#137 PR-F, #138 PR-C) stay free of unrelated reformatting noise.Applies exactly what the repo's own pre-commit hooks (ruff
--fix, autoflake, isort--profile=black, black-l119) produce — no hand edits:vime/ray/rollout.pyfrom argparse import Namespace(ruff F401 / autoflake; zero remaining refs)ray.utilthird-party import)_start_routerso third-party (vllm_router.router_args.RouterArgs) precedes first-party (vime.utils.http_utils.run_router) — behavior-neutralvime/backends/vllm_utils/vllm_engine.pyclass VLLMEngine(black E302)Why
mainis already red onpre-commit run --all-filesin these two files. Any PR touching them inherits the red gate. Fixing it here keeps the gate green for #137/#138 without bundling formatting churn into review.Verification
python -m py_compileclean on both files.🤖 Generated with Claude Code