Skip to content

Commit

Permalink
🏷️ fix some matcher's redundant optional
Browse files Browse the repository at this point in the history
  • Loading branch information
A-kirami committed Apr 1, 2022
1 parent 82803ff commit 0acb8c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nonebot/plugin/on.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions nonebot/plugin/on.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def on_request(
) -> Type[Matcher]: ...
def on_startswith(
msg: Union[str, Tuple[str, ...]],
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
ignorecase: bool = ...,
*,
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
Expand All @@ -69,7 +69,7 @@ def on_startswith(
) -> Type[Matcher]: ...
def on_endswith(
msg: Union[str, Tuple[str, ...]],
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
ignorecase: bool = ...,
*,
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
Expand All @@ -81,7 +81,7 @@ def on_endswith(
) -> Type[Matcher]: ...
def on_fullmatch(
msg: Union[str, Tuple[str, ...]],
rule: Optional[Optional[Union[Rule, T_RuleChecker]]] = ...,
rule: Optional[Union[Rule, T_RuleChecker]] = ...,
ignorecase: bool = ...,
*,
permission: Optional[Union[Permission, T_PermissionChecker]] = ...,
Expand Down

0 comments on commit 0acb8c1

Please sign in to comment.