From 14b410250699e419ec0ed708b2179c0eba7d8691 Mon Sep 17 00:00:00 2001 From: TrigonaMinima Date: Sat, 30 May 2020 20:33:13 +0530 Subject: [PATCH] document: update return value of extract and extractOne methods --- src/rapidfuzz/process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rapidfuzz/process.py b/src/rapidfuzz/process.py index 72b9b29..2187772 100644 --- a/src/rapidfuzz/process.py +++ b/src/rapidfuzz/process.py @@ -78,7 +78,10 @@ def extract(query: str, choices: Iterable, scorer: Callable = fuzz.WRatio, proce a lower score than this number will not be returned. Defaults to 0 Returns: - List[Tuple[str, float]]: returns a list of all matches that have a score >= score_cutoff + Union[List[Tuple[str, float]], List[Tuple[str, float, str]]]: Returns a + list of all matches that have a `score >= score_cutoff`. The list will + be of either `(, )` when `choices` is a list of strings or `(, , )` when + `choices` is a mapping. """ results = iterExtract(query, choices, scorer, processor, score_cutoff)