refactor: remove 8 dead symbols + vestigial where.py re-export (BE-3268)#525
refactor: remove 8 dead symbols + vestigial where.py re-export (BE-3268)#525mattmillerai wants to merge 1 commit into
Conversation
Delete zero-reference symbols confirmed dead by full-repo grep (no decorators, no dynamic/string refs, no __all__ exports): - update.py: get_version_from_pyproject (+ orphaned metadata import) - utils.py: install_conda_package (+ orphaned subprocess/typer/print-shim imports) - auth/store.py: known_providers (+ orphaned Iterable import); callers use SUPPORTED_PROVIDERS directly - command/install.py: get_os_details - ui.py: prompt_autocomplete - command/generate/spec.py: active_spec_path (unused wrapper over _select_spec_path) - cmdline.py: validate_comfyui (undecorated; distinct from custom_nodes validate_comfyui_manager) - cloud/oauth.py: OAuthCancelled (never raised or caught) - where.py: vestigial get_token re-export line Also removes the coupled oauth_cancelled entry from error_codes.REGISTRY: the OAuthCancelled class attribute was the only source of that code, so deleting the class made it dead and the registry's own test_every_registered_code_is_raised requires it gone.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
✅ No high-signal findings.
Panel: 6/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)
Resolver pass: no code changes needed — both red checks are pre-existing repo-wide breaksWent through this PR for conflicts, CI, and review feedback. Summary: nothing actionable on the diff itself; the two failures are upstream/infra problems that also break Merge conflictNone — Review feedbackNo unresolved review threads. Cursor consolidated panel: "✅ No high-signal findings" (6/8 reviewers contributed). CodeRabbit: skipped (no matching review label). ❌
|
Resolver re-check: still no changes needed — and both CI breaks now have fixes in flightRe-verified this PR from scratch in an isolated worktree. Conclusion is unchanged: the diff is clean and nothing here is actionable. Updating my earlier comment with one new fact — the two red checks are already being fixed by other PRs, so no follow-up tickets are needed. Verification of this diff (re-run, not carried over)
Both red checks are pre-existing and reproduce on PRs that don't touch the codeConfirmed identical failures on #543, #544, #545, #547.
Already addressed by → #536 (BE-3290) / #533 (BE-3285), with #537 (BE-3292) pinning CI to
NetNo follow-ups filed — filing any would duplicate the five PRs above. This PR needs no changes; it should go green on its own once the tomlkit fix lands on |
ELI-5
There were 8 functions/classes in the codebase that nothing ever called, plus one leftover "re-export" line — like a light switch wired to nothing. This PR deletes them. Because nothing referenced them, nothing changes at runtime; the code just gets smaller and less confusing. Matches the merged precedent of #499/#504.
What & why
Deletes 8 zero-reference symbols plus a vestigial
where.pyre-export line. Each was verified dead by full-repo grep (definition-only hits — no decorators, no string/dynamic references, no__all__exports):get_version_from_pyprojectcomfy_cli/update.pyinstall_conda_packagecomfy_cli/utils.pyknown_providerscomfy_cli/auth/store.py(1-line wrapper; real callers useSUPPORTED_PROVIDERSdirectly)get_os_detailscomfy_cli/command/install.pyprompt_autocompletecomfy_cli/ui.pyactive_spec_pathcomfy_cli/command/generate/spec.py(unused wrapper over_select_spec_path)validate_comfyuicomfy_cli/cmdline.py(undecorated — not a typer callback; distinct fromcustom_nodesvalidate_comfyui_manager)OAuthCancelledcomfy_cli/cloud/oauth.py(never raised or caught anywhere)get_tokenre-exportcomfy_cli/where.py:27(all callers usecomfy_cli.cancellationdirectly)Coupled cleanups (kept the tree honest / green)
metadata(update.py),Iterable(store.py), andsubprocess/typer/ therprint as printshim (utils.py — all three were used only byinstall_conda_package).oauth_cancelledregistry entry removed fromcomfy_cli/error_codes.py. TheOAuthCancelledclass attributecode = "oauth_cancelled"was the only source that made that code count as "raised"; deleting the class left it dead, and the repo's owntest_every_registered_code_is_raisedrequires dead entries be deleted. This also drops it from thecomfy --json discovercontract — safe, because the code was never actually raised, so no consumer could ever have received it.Judgment calls / flags
OAuthCancelled(flagged per ticket): never raised or caught today. If a branch in flight plans to use it for user-abort during login, it (and theoauth_cancellederror code) can be re-added at that point.known_providers,OAuthCancelled), but deleting unreferenced code changes no auth behavior.Testing
ruff check+ruff format --check: clean.pytestsuite: 2573 passed, 37 skipped.