Explicitly wrap partial with staticmethod for Py3.14

This commit is contained in:
Šarūnas Nejus 2025-10-26 23:04:17 +00:00
parent 77dffd551d
commit ec141dbfd6
No known key found for this signature in database

View file

@ -745,7 +745,9 @@ class Translator(RequestHandler):
TRANSLATE_URL = "https://api.cognitive.microsofttranslator.com/translate" TRANSLATE_URL = "https://api.cognitive.microsofttranslator.com/translate"
LINE_PARTS_RE = re.compile(r"^(\[\d\d:\d\d.\d\d\]|) *(.*)$") LINE_PARTS_RE = re.compile(r"^(\[\d\d:\d\d.\d\d\]|) *(.*)$")
SEPARATOR = " | " SEPARATOR = " | "
remove_translations = partial(re.compile(r" / [^\n]+").sub, "") remove_translations = staticmethod(
partial(re.compile(r" / [^\n]+").sub, "")
)
_log: Logger _log: Logger
api_key: str api_key: str