diff --git a/VERSION b/VERSION index 6f4eebd..100435b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/src/rapidfuzz/process.py b/src/rapidfuzz/process.py index 907e5f5..72b4f72 100644 --- a/src/rapidfuzz/process.py +++ b/src/rapidfuzz/process.py @@ -10,7 +10,7 @@ def iterExtract(query: str, choices: Iterable, scorer: Callable = fuzz.WRatio, p score_cutoff: float = 0) -> Generator[Tuple[str, float], None, None]: a = processor(query) if processor else query - if isinstance(choices, dict): + if hasattr(choices, "items"): for choice, match_choice in choices.items(): b = processor(match_choice) if processor else match_choice @@ -135,7 +135,7 @@ def extractOne(query: str, choices: Iterable, scorer: Callable = fuzz.WRatio, pr result_score = 0 result_choice = "" - if isinstance(choices, dict): + if hasattr(choices, "items"): choice_key = "" for choice, match_choice in choices.items(): b = processor(match_choice) if processor else match_choice