From b028ee2ad7b37a8240fced3602a3def5d7e6d832 Mon Sep 17 00:00:00 2001 From: clintval Date: Tue, 24 Dec 2024 09:14:38 -0500 Subject: [PATCH] chore: pluralize --- fgpyo/sam/__init__.py | 4 ++-- tests/fgpyo/sam/test_template_iterator.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fgpyo/sam/__init__.py b/fgpyo/sam/__init__.py index 48361dc..c78dd65 100644 --- a/fgpyo/sam/__init__.py +++ b/fgpyo/sam/__init__.py @@ -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) diff --git a/tests/fgpyo/sam/test_template_iterator.py b/tests/fgpyo/sam/test_template_iterator.py index 5162965..d7516f2 100644 --- a/tests/fgpyo/sam/test_template_iterator.py +++ b/tests/fgpyo/sam/test_template_iterator.py @@ -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: