Cleanup previous PR

This commit is contained in:
Kovid Goyal 2022-11-18 10:42:06 +05:30
parent 43c0e0f586
commit ffefd0f581
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -7,14 +7,13 @@ import subprocess
import sys import sys
from collections import defaultdict from collections import defaultdict
from contextlib import contextmanager from contextlib import contextmanager
from datetime import date from functools import lru_cache, partial
from functools import partial
from html.entities import html5 from html.entities import html5
from itertools import groupby from itertools import groupby
from operator import itemgetter from operator import itemgetter
from typing import ( from typing import (
Callable, DefaultDict, Dict, FrozenSet, Generator, Iterable, List, Callable, DefaultDict, Dict, FrozenSet, Generator, Iterable, List, Optional, Set,
Optional, Set, Tuple, Union Tuple, Union,
) )
from urllib.request import urlopen from urllib.request import urlopen
@ -45,6 +44,7 @@ def get_data(fname: str, folder: str = 'UCD') -> Iterable[str]:
yield line yield line
@lru_cache(maxsize=2)
def unicode_version() -> Tuple[int, int, int]: def unicode_version() -> Tuple[int, int, int]:
for line in get_data("ReadMe.txt"): for line in get_data("ReadMe.txt"):
m = re.search(r'Version\s+(\d+)\.(\d+)\.(\d+)', line) m = re.search(r'Version\s+(\d+)\.(\d+)\.(\d+)', line)