Update type hint syntax for Python < 3.10 compatibility

This commit is contained in:
KnugiHK
2025-05-17 16:18:16 +08:00
parent 3f88f7fe08
commit a53e5a2b3d

View File

@@ -601,7 +601,7 @@ def setup_template(template: Optional[str], no_avatar: bool, experimental: bool
APPLE_TIME = 978307200
def safe_name(text: Union[str|bytes]) -> str:
def safe_name(text: Union[str, bytes]) -> str:
"""
Sanitize the input text and generates a safe file name.
This function serves a similar purpose to slugify() from