mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
💡 add docstring
This commit is contained in:
parent
7c27fbe1d5
commit
fdffaf4e85
@ -627,6 +627,7 @@ class Matcher(metaclass=MatcherMeta):
|
||||
priority=0,
|
||||
block=True,
|
||||
plugin=self.plugin,
|
||||
module=self.module,
|
||||
expire_time=datetime.now() + bot.config.session_expire_timeout,
|
||||
default_state=self.state,
|
||||
default_parser=self.__class__._default_parser,
|
||||
@ -663,6 +664,7 @@ class Matcher(metaclass=MatcherMeta):
|
||||
priority=0,
|
||||
block=True,
|
||||
plugin=self.plugin,
|
||||
module=self.module,
|
||||
expire_time=datetime.now() + bot.config.session_expire_timeout,
|
||||
default_state=self.state,
|
||||
default_parser=self.__class__._default_parser,
|
||||
|
@ -40,9 +40,16 @@ class Plugin(object):
|
||||
- **类型**: ``Set[Type[Matcher]]``
|
||||
- **说明**: 插件内定义的 ``Matcher``
|
||||
"""
|
||||
# TODO
|
||||
parent_plugin: Optional["Plugin"] = None
|
||||
"""
|
||||
- **类型**: ``Optional[Plugin]``
|
||||
- **说明**: 父插件
|
||||
"""
|
||||
sub_plugins: Set["Plugin"] = field(default_factory=set)
|
||||
"""
|
||||
- **类型**: ``Set[Plugin]``
|
||||
- **说明**: 子插件集合
|
||||
"""
|
||||
|
||||
|
||||
def get_plugin(name: str) -> Optional[Plugin]:
|
||||
|
Loading…
Reference in New Issue
Block a user