From 1a1d977de53785fca84622fab4e9f18d49f908e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Thu, 31 Oct 2024 02:30:23 +0800 Subject: [PATCH] shit --- src/LunaTranslator/translator/basetranslator.py | 7 +------ src/LunaTranslator/translator/sakura.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/LunaTranslator/translator/basetranslator.py b/src/LunaTranslator/translator/basetranslator.py index 14f38c1b..fa78fe1b 100644 --- a/src/LunaTranslator/translator/basetranslator.py +++ b/src/LunaTranslator/translator/basetranslator.py @@ -318,12 +318,7 @@ class basetrans(commonbase): return functools.partial(__maybeshow, callback) - def translate_and_collect( - self, - contentsolved: str | dict, - is_auto_run, - callback, - ): + def translate_and_collect(self, contentsolved, is_auto_run, callback): if isinstance(contentsolved, dict): if self._compatible_flag_is_sakura_less_than_5_52_3: query_use = json.dumps(contentsolved) diff --git a/src/LunaTranslator/translator/sakura.py b/src/LunaTranslator/translator/sakura.py index c591369d..09656c2c 100644 --- a/src/LunaTranslator/translator/sakura.py +++ b/src/LunaTranslator/translator/sakura.py @@ -212,7 +212,7 @@ class TS(basetrans): yield res - def translate(self, query: str | dict): + def translate(self, query): if isinstance(query, dict): gpt_dict = query["gpt_dict"] contentraw = query["contentraw"]