mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-26 07:41:20 +00:00
💥 Remove: 移除 Python 3.8 支持 (#2641)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from typing import List, Match, Tuple
|
||||
from re import Match
|
||||
|
||||
from nonebot.typing import T_State
|
||||
from nonebot.adapters import Message
|
||||
@ -32,7 +32,7 @@ async def legacy_state(state):
|
||||
async def not_legacy_state(state: int): ...
|
||||
|
||||
|
||||
async def command(cmd: Tuple[str, ...] = Command()) -> Tuple[str, ...]:
|
||||
async def command(cmd: tuple[str, ...] = Command()) -> tuple[str, ...]:
|
||||
return cmd
|
||||
|
||||
|
||||
@ -59,8 +59,8 @@ async def shell_command_args(
|
||||
|
||||
|
||||
async def shell_command_argv(
|
||||
shell_command_argv: List[str] = ShellCommandArgv(),
|
||||
) -> List[str]:
|
||||
shell_command_argv: list[str] = ShellCommandArgv(),
|
||||
) -> list[str]:
|
||||
return shell_command_argv
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ async def regex_dict(regex_dict: dict = RegexDict()) -> dict:
|
||||
return regex_dict
|
||||
|
||||
|
||||
async def regex_group(regex_group: Tuple = RegexGroup()) -> Tuple:
|
||||
async def regex_group(regex_group: tuple = RegexGroup()) -> tuple:
|
||||
return regex_group
|
||||
|
||||
|
||||
@ -80,8 +80,8 @@ async def regex_str(
|
||||
entire: str = RegexStr(),
|
||||
type_: str = RegexStr("type"),
|
||||
second: str = RegexStr(2),
|
||||
groups: Tuple[str, ...] = RegexStr(1, "arg"),
|
||||
) -> Tuple[str, str, str, Tuple[str, ...]]:
|
||||
groups: tuple[str, ...] = RegexStr(1, "arg"),
|
||||
) -> tuple[str, str, str, tuple[str, ...]]:
|
||||
return entire, type_, second, groups
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user