mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🎨 提高代码质量 2022.8.31
This commit is contained in:
parent
25289959d9
commit
65cf31e68b
@ -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
|
||||
|
@ -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]] = []
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user