Skip to content

Commit

Permalink
fix(mi): use old type annotation format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 13, 2024
1 parent cfc80b6 commit 665d052
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion strkit/mi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def should_exclude_locus(self, contig: str, start: int, end: int) -> bool:

def should_skip_locus(
self, contig: str, start: int, end: int, cached_overlapping: Optional[list] = None
) -> str | None:
) -> Optional[str]:
# Returns either a reason string (if yes) or None (=== no)

# Check to make sure call is present in TRF BED file, if it is specified
Expand Down
4 changes: 2 additions & 2 deletions strkit/mi/expansionhunter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pysam

from typing import Union
from typing import Optional, Union

from .base import BaseCalculator
from .result import MIContigResult, MILocusData
Expand All @@ -12,7 +12,7 @@
__all__ = ["ExpansionHunterCalculator"]


def _parse_allele(a: Union[int, str, None]) -> int | None:
def _parse_allele(a: Union[int, str, None]) -> Optional[int]:
if isinstance(a, str):
if a == ".":
return None
Expand Down
4 changes: 2 additions & 2 deletions strkit/mi/trgt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pysam

from typing import Union
from typing import Optional, Union

from .base import BaseCalculator
from .result import MIContigResult, MILocusData
Expand All @@ -12,7 +12,7 @@
__all__ = ["TRGTCalculator"]


def _parse_allele(a: Union[int, str, None]) -> int | None:
def _parse_allele(a: Union[int, str, None]) -> Optional[int]:
if isinstance(a, str):
if a == ".":
return None
Expand Down

0 comments on commit 665d052

Please sign in to comment.