mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:05:25 +08:00
🏷️ fix some matcher's redundant optional (#904)
Fix: 修复部分事件响应器参数类型中冗余的 Optional
This commit is contained in:
parent
82803ff90f
commit
f20cf785ce
@ -238,7 +238,7 @@ def on_request(
|
|||||||
|
|
||||||
def on_startswith(
|
def on_startswith(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||||
ignorecase: bool = False,
|
ignorecase: bool = False,
|
||||||
_depth: int = 0,
|
_depth: int = 0,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
@ -262,7 +262,7 @@ def on_startswith(
|
|||||||
|
|
||||||
def on_endswith(
|
def on_endswith(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||||
ignorecase: bool = False,
|
ignorecase: bool = False,
|
||||||
_depth: int = 0,
|
_depth: int = 0,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
@ -286,7 +286,7 @@ def on_endswith(
|
|||||||
|
|
||||||
def on_fullmatch(
|
def on_fullmatch(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = None,
|
rule: Optional[Union[Rule, T_RuleChecker]] = None,
|
||||||
ignorecase: bool = False,
|
ignorecase: bool = False,
|
||||||
_depth: int = 0,
|
_depth: int = 0,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
@ -57,7 +57,7 @@ def on_request(
|
|||||||
) -> Type[Matcher]: ...
|
) -> Type[Matcher]: ...
|
||||||
def on_startswith(
|
def on_startswith(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
|
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
|
||||||
ignorecase: bool = ...,
|
ignorecase: bool = ...,
|
||||||
*,
|
*,
|
||||||
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
||||||
@ -69,7 +69,7 @@ def on_startswith(
|
|||||||
) -> Type[Matcher]: ...
|
) -> Type[Matcher]: ...
|
||||||
def on_endswith(
|
def on_endswith(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
|
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
|
||||||
ignorecase: bool = ...,
|
ignorecase: bool = ...,
|
||||||
*,
|
*,
|
||||||
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
||||||
@ -81,7 +81,7 @@ def on_endswith(
|
|||||||
) -> Type[Matcher]: ...
|
) -> Type[Matcher]: ...
|
||||||
def on_fullmatch(
|
def on_fullmatch(
|
||||||
msg: Union[str, Tuple[str, ...]],
|
msg: Union[str, Tuple[str, ...]],
|
||||||
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
|
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
|
||||||
ignorecase: bool = ...,
|
ignorecase: bool = ...,
|
||||||
*,
|
*,
|
||||||
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
|
||||||
|
Loading…
Reference in New Issue
Block a user