Skip to content

Commit

Permalink
using Union for typing for python3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Zulkower committed Nov 15, 2024
1 parent 71a3065 commit e51c378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ginkgo_ai_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from Bio import SeqIO
from pathlib import Path
import gzip
from typing import Iterator
from typing import Iterator, Union


class IteratorWithLength(Iterator):
Expand Down Expand Up @@ -34,7 +34,7 @@ def __len__(self):
return self._length


def _fast_fasta_sequence_count(fasta_path: str | Path):
def _fast_fasta_sequence_count(fasta_path: Union[str, Path]):
"""Count the number of sequences in a fasta file by counting the ">" lines."""
if str(fasta_path).endswith(".gz"):
with gzip.open(fasta_path, "rt") as f:
Expand Down

0 comments on commit e51c378

Please sign in to comment.