From e8f7f1d0e90d6c2c5aab515550615f51303a91f0 Mon Sep 17 00:00:00 2001 From: clintval Date: Wed, 1 Jan 2025 17:16:18 -0500 Subject: [PATCH] chore: tiny fixups --- fgpyo/sam/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fgpyo/sam/__init__.py b/fgpyo/sam/__init__.py index 5424698..5469645 100644 --- a/fgpyo/sam/__init__.py +++ b/fgpyo/sam/__init__.py @@ -1215,9 +1215,9 @@ class AuxAlignment(ABC, DataclassInstance): reference_start: int is_forward: bool cigar: Cigar - mapq: Optional[int] = None - edit_distance: Optional[int] = None - alignment_score: Optional[int] = None + mapq: int | None = None + edit_distance: int | None = None + alignment_score: int | None = None def __post_init__(self) -> None: """Perform post-initialization validation on this dataclass.""" @@ -1630,10 +1630,10 @@ def parse(cls, string: str) -> Self: @classmethod @deprecated("The `parse_sa_tag` method is deprecated, use `many_from_tag`.") - def parse_sa_tag(cls, tag: str) -> List[Self]: - return [cls.from_tag_item(a) for a in tag.split(";") if len(a) > 0] + def parse_sa_tag(cls, tag: str) -> list[Self]: + return cls.many_from_tag(tag) @classmethod @deprecated("The `from_read` method is deprecated, use `many_from_primary`.") - def from_read(cls, read: pysam.AlignedSegment) -> List[Self]: + def from_read(cls, read: pysam.AlignedSegment) -> list[Self]: return cls.many_from_primary(read)