Skip to content

Commit

Permalink
chore: tiny fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Jan 1, 2025
1 parent cf6e34f commit e8f7f1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fgpyo/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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)

0 comments on commit e8f7f1d

Please sign in to comment.