diff --git a/CHANGES.md b/CHANGES.md index b4b074f1..f139e92b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ * Update Pytvmaze library 2.0.8 (81888a5) to 2.0.8 (b451391) * Update Rarfile 4.1a1 (8a72967) to 4.1 (c9140d8) * Update soupsieve 2.4.1 (2e66beb) to 2.5.0 (dc71495) +* Update thefuzz 0.19.0 (c2cd4f4) to 0.21.0 (0b49e4a) ### 3.30.1 (2023-10-02 22:50:00 UTC) diff --git a/lib/thefuzz/__init__.py b/lib/thefuzz/__init__.py index 482e4a19..e4533712 100644 --- a/lib/thefuzz/__init__.py +++ b/lib/thefuzz/__init__.py @@ -1 +1 @@ -__version__ = '0.19.0' +__version__ = '0.21.0' diff --git a/lib/thefuzz/process.py b/lib/thefuzz/process.py index f6b15eaa..bdfe900e 100644 --- a/lib/thefuzz/process.py +++ b/lib/thefuzz/process.py @@ -4,6 +4,7 @@ from . import utils import logging from rapidfuzz import fuzz as rfuzz from rapidfuzz import process as rprocess +from functools import partial _logger = logging.getLogger(__name__) @@ -23,11 +24,14 @@ def _get_processor(processor, scorer): fuzz.UWRatio, fuzz.UQRatio): return processor - if not processor: - return utils.full_process + force_ascii = scorer not in [fuzz.UWRatio, fuzz.UQRatio] + pre_processor = partial(utils.full_process, force_ascii=force_ascii) + + if not processor or processor == utils.full_process: + return pre_processor def wrapper(s): - return utils.full_process(processor(s)) + return pre_processor(processor(s)) return wrapper diff --git a/lib/thefuzz/py.typed b/lib/thefuzz/py.typed new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/lib/thefuzz/py.typed @@ -0,0 +1 @@ +