🐛 fix group attrs

This commit is contained in:
yanyongyu 2020-10-02 00:28:53 +08:00
parent 3e4dc1a123
commit d71260ed68

View File

@ -304,9 +304,12 @@ class MatcherGroup:
self.priority = priority
self.block = block
self.module = module
self.default_state = default_state
self.expire_time = expire_time
self._default_state = default_state
self._default_parser: Optional[ArgsParser] = None
def __repr__(self) -> str:
return (
f"<MatcherGroup from {self.module or 'unknow'}, type={self.type}, "
@ -335,7 +338,8 @@ class MatcherGroup:
priority=priority or self.priority,
block=block or self.block,
module=module or self.module,
default_state=default_state or self.default_state,
default_state=default_state or
self._default_state,
expire_time=expire_time or self.expire_time)
self.matchers.append(matcher)
return matcher