From 9986318c2192cab3aa7a82554e3bcceb0bf938c2 Mon Sep 17 00:00:00 2001 From: Kawin Date: Sun, 6 Oct 2024 03:21:24 -0400 Subject: [PATCH] typing for common_sub_strings module --- src/pydna/common_sub_strings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pydna/common_sub_strings.py b/src/pydna/common_sub_strings.py index 94617cf7..80dd9691 100644 --- a/src/pydna/common_sub_strings.py +++ b/src/pydna/common_sub_strings.py @@ -18,7 +18,7 @@ from operator import itemgetter as _itemgetter from typing import List as _List, Tuple as _Tuple -Match = _Tuple[int, int, int] +Match = _Tuple[int, int, int] # (x_start, y_start, length) # def _kark_sort(s, SA, n, K): # def radixpass(a, b, r, s, n, k): @@ -314,7 +314,7 @@ # return match -def common_sub_strings(stringx: str, stringy: str, limit=25) -> _List[Match]: +def common_sub_strings(stringx: str, stringy: str, limit: int = 25) -> _List[Match]: """ Finds all common substrings between stringx and stringy, and returns them sorted by length. @@ -344,7 +344,7 @@ def common_sub_strings(stringx: str, stringy: str, limit=25) -> _List[Match]: return matches -def terminal_overlap(stringx: str, stringy: str, limit=15) -> _List[Match]: +def terminal_overlap(stringx: str, stringy: str, limit: int = 15) -> _List[Match]: """Finds the the flanking common substrings between stringx and stringy longer than limit. This means that the results only contains substrings that starts or ends at the the ends of stringx and stringy.