🎨 提高代码质量 2022.8.31

This commit is contained in:
洛水居室 2022-08-31 14:48:03 +08:00 committed by GitHub
parent 25289959d9
commit 65cf31e68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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]] = []

View File

@ -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

View File

@ -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

View File

@ -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: