mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
🏷️ fix regex rule typing error
This commit is contained in:
parent
bb64c6fb71
commit
785eac1345
@ -489,7 +489,7 @@ def on_shell_command(cmd: Union[str, Tuple[str, ...]],
|
|||||||
|
|
||||||
def on_regex(pattern: str,
|
def on_regex(pattern: str,
|
||||||
flags: Union[int, re.RegexFlag] = 0,
|
flags: Union[int, re.RegexFlag] = 0,
|
||||||
rule: Optional[Rule] = None,
|
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||||
**kwargs) -> Type[Matcher]:
|
**kwargs) -> Type[Matcher]:
|
||||||
"""
|
"""
|
||||||
:说明:
|
:说明:
|
||||||
|
@ -156,7 +156,7 @@ def on_shell_command(cmd: Union[str, Tuple[str, ...]],
|
|||||||
|
|
||||||
def on_regex(pattern: str,
|
def on_regex(pattern: str,
|
||||||
flags: Union[int, re.RegexFlag] = 0,
|
flags: Union[int, re.RegexFlag] = 0,
|
||||||
rule: Optional[Rule] = ...,
|
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
|
||||||
*,
|
*,
|
||||||
permission: Optional[Permission] = ...,
|
permission: Optional[Permission] = ...,
|
||||||
handlers: Optional[List[T_Handler]] = ...,
|
handlers: Optional[List[T_Handler]] = ...,
|
||||||
@ -409,7 +409,7 @@ class MatcherGroup:
|
|||||||
pattern: str,
|
pattern: str,
|
||||||
flags: Union[int, re.RegexFlag] = 0,
|
flags: Union[int, re.RegexFlag] = 0,
|
||||||
*,
|
*,
|
||||||
rule: Optional[Rule] = ...,
|
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
|
||||||
permission: Optional[Permission] = ...,
|
permission: Optional[Permission] = ...,
|
||||||
handlers: Optional[List[T_Handler]] = ...,
|
handlers: Optional[List[T_Handler]] = ...,
|
||||||
temp: bool = ...,
|
temp: bool = ...,
|
||||||
|
Loading…
Reference in New Issue
Block a user