From 26b6f15d14e30dc3349abe2933edb051b46be4b8 Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 3 Feb 2025 18:10:15 +0000 Subject: [compat] Make casefold private * if required, not supported: `from youtube_dl.casefold import _casefold as casefold` --- youtube_dl/casefold.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'youtube_dl/casefold.py') diff --git a/youtube_dl/casefold.py b/youtube_dl/casefold.py index ad9c66f8e..712b2e7fa 100644 --- a/youtube_dl/casefold.py +++ b/youtube_dl/casefold.py @@ -10,9 +10,10 @@ from .compat import ( # https://github.com/unicode-org/icu/blob/main/icu4c/source/data/unidata/CaseFolding.txt # In case newly foldable Unicode characters are defined, paste the new version # of the text inside the ''' marks. -# The text is expected to have only blank lines andlines with 1st character #, +# The text is expected to have only blank lines and lines with 1st character #, # all ignored, and fold definitions like this: -# `from_hex_code; space_separated_to_hex_code_list; comment` +# `from_hex_code; status; space_separated_to_hex_code_list; comment` +# Only `status` C/F are used. _map_str = ''' # CaseFolding-15.0.0.txt @@ -1657,11 +1658,6 @@ _map = dict( del _map_str -def casefold(s): +def _casefold(s): assert isinstance(s, compat_str) return ''.join((_map.get(c, c) for c in s)) - - -__all__ = [ - 'casefold', -] -- cgit v1.2.3