mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-07 04:26:45 +00:00
🏷️ fix some matcher's redundant optional (#904)
Fix: 修复部分事件响应器参数类型中冗余的 Optional
This commit is contained in:
@ -238,7 +238,7 @@ def on_request(
|
||||
|
||||
def on_startswith(
|
||||
msg: Union[str, Tuple[str, ...]],
|
||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
||||
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||
ignorecase: bool = False,
|
||||
_depth: int = 0,
|
||||
**kwargs,
|
||||
@ -262,7 +262,7 @@ def on_startswith(
|
||||
|
||||
def on_endswith(
|
||||
msg: Union[str, Tuple[str, ...]],
|
||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
||||
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||
ignorecase: bool = False,
|
||||
_depth: int = 0,
|
||||
**kwargs,
|
||||
@ -286,7 +286,7 @@ def on_endswith(
|
||||
|
||||
def on_fullmatch(
|
||||
msg: Union[str, Tuple[str, ...]],
|
||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
||||
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||
ignorecase: bool = False,
|
||||
_depth: int = 0,
|
||||
**kwargs,
|
||||
|
Reference in New Issue
Block a user