From 57083fea1a5e610c9fb0b0c723eff3f084577814 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 2 Nov 2021 16:47:44 -0700 Subject: ftfy 'fix_entities' argument has been renamed --- python/fatcat_tools/normal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/fatcat_tools/normal.py b/python/fatcat_tools/normal.py index e27754f5..eb61c326 100644 --- a/python/fatcat_tools/normal.py +++ b/python/fatcat_tools/normal.py @@ -6,7 +6,7 @@ free-form input, titles, etc. import re import base64 -from typing import Optional +from typing import Optional, Union import unicodedata import ftfy @@ -326,10 +326,10 @@ def clean_str(thing: Optional[str], force_xml: bool = False) -> Optional[str]: """ if not thing: return None - fix_entities = 'auto' + unescape_html: Union[str, bool] = 'auto' if force_xml: - fix_entities = True - fixed = ftfy.fix_text(thing, fix_entities=fix_entities).strip() + unescape_html = True + fixed = ftfy.fix_text(thing, unescape_html=unescape_html).strip() if not fixed or len(fixed) <= 1: # wasn't zero-length before, but is now; return None return None -- cgit v1.2.3