From 95fbdc87e3d41dfed45cf1864edc00578e5bf2af Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sat, 2 Mar 2024 20:03:13 +0100 Subject: [PATCH] Fix Bio.Align.PairwiseAlignment annotation Was removed in Biopython 1.82 --- psico/seqalign.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/psico/seqalign.py b/psico/seqalign.py index c025e3f..fbea3a9 100644 --- a/psico/seqalign.py +++ b/psico/seqalign.py @@ -13,7 +13,10 @@ import Bio from Bio.SeqIO import _FormatToIterator from pymol import CmdException -from typing import Iterator, Optional, Tuple, Union +from typing import TYPE_CHECKING, Iterator, Optional, Tuple, Union + +if TYPE_CHECKING: + import Bio.Align _PathArg = Union[os.PathLike, str] @@ -47,7 +50,7 @@ def _get_aligner_BLOSUM62() -> "Bio.Align.PairwiseAligner": def _msa_from_pairwise( - pairwise: "Bio.Align.PairwiseAlignment", + pairwise: "Bio.Align.Alignment", biopython_version: tuple = (1, 81), ) -> "Bio.Align.MultipleSeqAlignment": from Bio.Align import MultipleSeqAlignment