💡 add docstring

This commit is contained in:
yanyongyu 2021-11-11 18:10:39 +08:00
parent 7c27fbe1d5
commit fdffaf4e85
2 changed files with 10 additions and 1 deletions

View File

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

View File

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