mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 17:49:24 +01:00
update @ Thu 2 Feb 16:03:48 EET 2023
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
c8e10f487b
commit
9615329846
1 changed files with 2 additions and 5 deletions
|
@ -9,7 +9,6 @@ import string
|
||||||
import sys
|
import sys
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
from base64 import b64decode, b64encode
|
from base64 import b64decode, b64encode
|
||||||
from collections.abc import Collection
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from glob import iglob
|
from glob import iglob
|
||||||
from html import escape as html_escape
|
from html import escape as html_escape
|
||||||
|
@ -19,7 +18,7 @@ from shutil import rmtree
|
||||||
from tempfile import gettempdir
|
from tempfile import gettempdir
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from timeit import default_timer as code_timer
|
from timeit import default_timer as code_timer
|
||||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
|
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Collection
|
||||||
from warnings import filterwarnings as filter_warnings
|
from warnings import filterwarnings as filter_warnings
|
||||||
|
|
||||||
import ujson # type: ignore
|
import ujson # type: ignore
|
||||||
|
@ -256,9 +255,7 @@ def remove_basic_punct(s: str) -> str:
|
||||||
return "".join(c for c in s if c not in "'\"()[]{}:;.,?!=#")
|
return "".join(c for c in s if c not in "'\"()[]{}:;.,?!=#")
|
||||||
|
|
||||||
|
|
||||||
def sanitise_title(
|
def sanitise_title(title: str, titleset: Collection[str], /, nosep: bool = False) -> str:
|
||||||
title: str, titleset: Collection[str], /, nosep: bool = False
|
|
||||||
) -> str:
|
|
||||||
title = " ".join(
|
title = " ".join(
|
||||||
[
|
[
|
||||||
w
|
w
|
||||||
|
|
Loading…
Add table
Reference in a new issue