Skip to content

Extract shared PileupColumn validity check#1392

Draft
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/consolidate-pileup-iteration
Draft

Extract shared PileupColumn validity check#1392
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/consolidate-pileup-iteration

Conversation

@nh13
Copy link
Copy Markdown
Contributor

@nh13 nh13 commented Mar 2, 2026

Summary

  • Extract a _check_pileup_valid() cdef helper on PileupColumn that raises ValueError if the pileup buffer is NULL (iterator exhausted)
  • All 7 public PileupColumn methods now call this helper instead of inlining the guard check
  • Also adds the previously missing guard to get_query_qualities() (fixing the same bug as PR Add missing NULL guard in PileupColumn.get_query_qualities #1380 but structurally)

Test plan

  • Run REF_PATH=: pytest tests/AlignmentFilePileup_test.py -v

AI disclosure: This PR was AI-assisted using Claude Code. The issue was identified via AI-guided code review, and the implementation was drafted by AI with human review and approval.

@nh13 nh13 force-pushed the nh13/consolidate-pileup-iteration branch from 73d61ce to 680a8ff Compare March 2, 2026 05:37
@nh13 nh13 marked this pull request as draft March 3, 2026 06:21
@nh13 nh13 changed the title refactor: extract shared PileupColumn guard check Extract shared PileupColumn validity check Mar 3, 2026
@nh13 nh13 force-pushed the nh13/consolidate-pileup-iteration branch from 680a8ff to 2714682 Compare March 3, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant