diff --git a/fgpyo/util/logging.py b/fgpyo/util/logging.py index 6603b9a..78b1e63 100644 --- a/fgpyo/util/logging.py +++ b/fgpyo/util/logging.py @@ -38,7 +38,7 @@ from threading import RLock from typing import Any from typing import Callable -from typing import Iterable +from typing import Collection from typing import Literal from typing import Optional from typing import Union @@ -166,7 +166,7 @@ def record_alignment( def record_alignments( self, - recs: Iterable[AlignedSegment], + recs: Collection[AlignedSegment], ) -> bool: """Correctly record multiple pysam.AlignedSegments (zero-based coordinates). diff --git a/tests/fgpyo/util/test_logging.py b/tests/fgpyo/util/test_logging.py index ca8584c..8b5bc33 100644 --- a/tests/fgpyo/util/test_logging.py +++ b/tests/fgpyo/util/test_logging.py @@ -95,7 +95,7 @@ def test_record_multiple_alignments() -> None: ) # Assert record is logged - assert progress.record_alignments(recs=template.all_recs()) is True + assert progress.record_alignments(recs=list(template.all_recs())) is True # Assert every record was logged assert len(actual) == 6