From 16bb30029b42d5a17fcf4bd077f4a1c8d09eabcb Mon Sep 17 00:00:00 2001 From: JackDandy Date: Fri, 7 Jun 2024 17:42:01 +0100 Subject: [PATCH] =?UTF-8?q?Update=20unidecode=20module=201.3.6=20(4141992)?= =?UTF-8?q?=20=E2=86=92=201.3.8=20(dfe397d).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 1 + lib/unidecode/__init__.py | 2 +- lib/unidecode/py.typed | 0 lib/unidecode/x01e.py | 2 +- lib/unidecode/x021.py | 6 ++--- lib/unidecode/x026.py | 46 ++++++++++++++++++++++----------------- lib/unidecode/x030.py | 6 ++--- lib/unidecode/x1f1.py | 10 ++++----- 8 files changed, 40 insertions(+), 33 deletions(-) create mode 100644 lib/unidecode/py.typed diff --git a/CHANGES.md b/CHANGES.md index 1201794a..f3e10232 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ * Update Requests library 2.31.0 (8812812) to 2.32.3 (0e322af) * Update Send2Trash 1.5.0 (66afce7) to 1.8.3 (91d0698) * Update Tornado Web Server 6.4 (b3f2a4b) to 6.4.1 (2a0e1d1) +* Update unidecode module 1.3.6 (4141992) to 1.3.8 (dfe397d) * Update urllib3 2.0.7 (56f01e0) to 2.2.1 (54d6edf) diff --git a/lib/unidecode/__init__.py b/lib/unidecode/__init__.py index 5633c458..7ac36754 100644 --- a/lib/unidecode/__init__.py +++ b/lib/unidecode/__init__.py @@ -19,7 +19,7 @@ b'Knosos' import warnings from typing import Dict, Optional, Sequence -Cache = {} # type: Dict[int, Optional[Sequence[Optional[str]]]] +Cache: Dict[int, Optional[Sequence[Optional[str]]]] = {} class UnidecodeError(ValueError): def __init__(self, message: str, index: Optional[int] = None) -> None: diff --git a/lib/unidecode/py.typed b/lib/unidecode/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/lib/unidecode/x01e.py b/lib/unidecode/x01e.py index 540786a8..1c28ab2d 100644 --- a/lib/unidecode/x01e.py +++ b/lib/unidecode/x01e.py @@ -157,7 +157,7 @@ data = ( 'S', # 0x9b None, # 0x9c None, # 0x9d -'Ss', # 0x9e +'SS', # 0x9e None, # 0x9f 'A', # 0xa0 'a', # 0xa1 diff --git a/lib/unidecode/x021.py b/lib/unidecode/x021.py index 6bd37f7e..2479c710 100644 --- a/lib/unidecode/x021.py +++ b/lib/unidecode/x021.py @@ -30,11 +30,11 @@ data = ( 'R', # 0x1c 'R', # 0x1d '', # 0x1e -'', # 0x1f +'R/', # 0x1f '(sm)', # 0x20 'TEL', # 0x21 '(tm)', # 0x22 -'', # 0x23 +'V/', # 0x23 'Z', # 0x24 '', # 0x25 'ohm', # 0x26 @@ -76,7 +76,7 @@ None, # 0x44 None, # 0x4a None, # 0x4b None, # 0x4c -None, # 0x4d +'A/S', # 0x4d 'F', # 0x4e None, # 0x4f ' 1/7 ', # 0x50 diff --git a/lib/unidecode/x026.py b/lib/unidecode/x026.py index 380e84b9..49b5f3eb 100644 --- a/lib/unidecode/x026.py +++ b/lib/unidecode/x026.py @@ -83,26 +83,32 @@ None, # 0x18 '', # 0x51 '', # 0x52 '', # 0x53 -'', # 0x54 -'', # 0x55 -'', # 0x56 -'', # 0x57 -'', # 0x58 -'', # 0x59 -'', # 0x5a -'', # 0x5b -'', # 0x5c -'', # 0x5d -'', # 0x5e -'', # 0x5f -'', # 0x60 -'', # 0x61 -'', # 0x62 -'', # 0x63 -'', # 0x64 -'', # 0x65 -'', # 0x66 -'', # 0x67 +'white king', # 0x54 +'white queen', # 0x55 +'white rook', # 0x56 +'white bishop', # 0x57 +'white knight', # 0x58 +'white pawn', # 0x59 +'black king', # 0x5a +'black queen', # 0x5b +'black rook', # 0x5c +'black bishop', # 0x5d +'black knight', # 0x5e +'black pawn', # 0x5f + +# Unicode standard doesn't give an explanation why card suits exist in black +# and white variants. Adding "white ..." and "black ..." here isn't useful +# since both variants can be used for either red or black suit color. +# +# See discussion at https://github.com/avian2/unidecode/pull/93 +'spades', # 0x60 +'hearts', # 0x61 +'diamonds', # 0x62 +'clubs', # 0x63 +'spades', # 0x64 +'hearts', # 0x65 +'diamonds', # 0x66 +'clubs', # 0x67 '', # 0x68 '', # 0x69 '', # 0x6a diff --git a/lib/unidecode/x030.py b/lib/unidecode/x030.py index 549ee824..958c9b1f 100644 --- a/lib/unidecode/x030.py +++ b/lib/unidecode/x030.py @@ -159,7 +159,7 @@ None, # 0x98 '"', # 0x9d '"', # 0x9e None, # 0x9f -None, # 0xa0 +'=', # 0xa0 'a', # 0xa1 'a', # 0xa2 'i', # 0xa3 @@ -250,8 +250,8 @@ None, # 0xa0 'vi', # 0xf8 've', # 0xf9 'vo', # 0xfa -'', # 0xfb -'', # 0xfc +'*', # 0xfb +'-', # 0xfc '"', # 0xfd '"', # 0xfe ) diff --git a/lib/unidecode/x1f1.py b/lib/unidecode/x1f1.py index 2f78cf01..fffc296e 100644 --- a/lib/unidecode/x1f1.py +++ b/lib/unidecode/x1f1.py @@ -105,9 +105,9 @@ None, # 0x4f '(X)', # 0x67 '(Y)', # 0x68 '(Z)', # 0x69 -None, # 0x6a -None, # 0x6b -None, # 0x6c +'(mc)', # 0x6a +'(md)', # 0x6b +'(mr)', # 0x6c None, # 0x6d None, # 0x6e None, # 0x6f @@ -155,7 +155,7 @@ None, # 0x8f '[UP!]', # 0x99 '[VS]', # 0x9a '[3D]', # 0x9b -'[2nc-Scr]', # 0x9c +'[2nd-Scr]', # 0x9c '[2K]', # 0x9d '[4K]', # 0x9e '[8K]', # 0x9f @@ -168,7 +168,7 @@ None, # 0x8f '[HC]', # 0xa6 '[HDR]', # 0xa7 '[Hi-res]', # 0xa8 -'[Loss-less]', # 0xa9 +'[Lossless]', # 0xa9 '[SHV]', # 0xaa '[UHD]', # 0xab '[VOD]', # 0xac