From 65cf31e68bea5ec149a2bf300e4fef1c33d5565a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 31 Aug 2022 14:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E6=8F=90=E9=AB=98=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B4=A8=E9=87=8F=202022.8.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jobs/public_cookies.py | 2 +- plugins/base.py | 2 +- plugins/genshin/uid.py | 3 ++- plugins/genshin/weapon.py | 2 +- plugins/system/inline.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jobs/public_cookies.py b/jobs/public_cookies.py index 8c4f416..136215c 100644 --- a/jobs/public_cookies.py +++ b/jobs/public_cookies.py @@ -12,7 +12,7 @@ from utils.service.inject import inject class PublicCookies: @inject - def __init__(self, public_cookies_service: PublicCookiesService): + def __init__(self, public_cookies_service: PublicCookiesService = None): self.public_cookies_service = public_cookies_service @classmethod diff --git a/plugins/base.py b/plugins/base.py index 6a79c64..c6f4431 100644 --- a/plugins/base.py +++ b/plugins/base.py @@ -55,7 +55,7 @@ class BasePlugins: class NewChatMembersHandler: @inject - def __init__(self, bot_admin_service: BotAdminService): + def __init__(self, bot_admin_service: BotAdminService = None): self.bot_admin_service = bot_admin_service self.callback: List[Tuple[Callable, int]] = [] diff --git a/plugins/genshin/uid.py b/plugins/genshin/uid.py index cdd43bd..d8a49db 100644 --- a/plugins/genshin/uid.py +++ b/plugins/genshin/uid.py @@ -27,7 +27,8 @@ class Uid(BasePlugins): COMMAND_RESULT, = range(10200, 10201) @inject - def __init__(self, user_service: UserService, cookies_service: CookiesService, template_service: TemplateService): + def __init__(self, user_service: UserService = None, cookies_service: CookiesService = None, + template_service: TemplateService = None): self.template_service = template_service self.cookies_service = cookies_service self.user_service = user_service diff --git a/plugins/genshin/weapon.py b/plugins/genshin/weapon.py index 99f2de6..d14183b 100644 --- a/plugins/genshin/weapon.py +++ b/plugins/genshin/weapon.py @@ -26,7 +26,7 @@ class WeaponPlugin(BasePlugins): ]] @inject - def __init__(self, template_service: TemplateService, wiki_service: WikiService): + def __init__(self, template_service: TemplateService = None, wiki_service: WikiService = None): self.wiki_service = wiki_service self.template_service = template_service diff --git a/plugins/system/inline.py b/plugins/system/inline.py index 6c5898b..184c27c 100644 --- a/plugins/system/inline.py +++ b/plugins/system/inline.py @@ -15,7 +15,7 @@ class Inline: """Inline模块""" @inject - def __init__(self, wiki_service: WikiService): + def __init__(self, wiki_service: WikiService = None): self.wiki_service = wiki_service async def inline_query(self, update: Update, _: CallbackContext) -> None: