Skip to content

source-control: babysit_util type-check helpers should be TypeGuards, deleting ~12 casts in merge/gh #3448

Description

@kyle-sexton

Context

Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). Deferred from the sweep as dedicated-PR-shaped work: the consolidation crosses file or contract boundaries a behavior-preserving sweep must not cross.

plugins/source-control/skills/babysit-prs/scripts/babysit_util.py:29 — converting the is_* helpers to TypeGuard returns deletes ~12 casts in babysit_merge/babysit_gh. One-diff change owned by the util module.

Proposed work

  • Convert to typing.TypeGuard and drop the now-redundant casts.

Acceptance criteria

  • mypy/pyright clean with the casts removed; test suite green.

References

  • plugins/source-control/skills/babysit-prs/scripts/babysit_util.py:29

Filed by the /code-tidying:batch-simplify closeout (Phase 8).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions