Skip to content

Commit

Permalink
chore: pluralize
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Dec 24, 2024
1 parent 173388d commit b028ee2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fgpyo/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,12 +941,12 @@ def primary_recs(self) -> Iterator[AlignedSegment]:
"""Returns a list with all the primary records for the template."""
return (r for r in (self.r1, self.r2) if r is not None)

def all_r1(self) -> Iterator[AlignedSegment]:
def all_r1s(self) -> Iterator[AlignedSegment]:
"""Yields all R1 alignments of this template including secondary and supplementary."""
r1_primary = [] if self.r1 is None else [self.r1]
return chain(r1_primary, self.r1_secondaries, self.r1_supplementals)

def all_r2(self) -> Iterator[AlignedSegment]:
def all_r2s(self) -> Iterator[AlignedSegment]:
"""Yields all R2 alignments of this template including secondary and supplementary."""
r2_primary = [] if self.r2 is None else [self.r2]
return chain(r2_primary, self.r2_secondaries, self.r2_supplementals)
Expand Down
4 changes: 2 additions & 2 deletions tests/fgpyo/sam/test_template_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_all_r1_and_all_r2() -> None:
)

assert template == expected
assert list(template.all_r1()) == [r1, r1_secondary, r1_supplementary]
assert list(template.all_r2()) == [r2, r2_secondary, r2_supplementary]
assert list(template.all_r1s()) == [r1, r1_secondary, r1_supplementary]
assert list(template.all_r2s()) == [r2, r2_secondary, r2_supplementary]


def test_to_templates() -> None:
Expand Down

0 comments on commit b028ee2

Please sign in to comment.