💥 Remove: 移除 Python 3.8 支持 (#2641)

This commit is contained in:
Ju4tCode
2024-04-16 00:33:48 +08:00
committed by GitHub
parent e93ee1ffec
commit 4a02dde83f
69 changed files with 1811 additions and 1848 deletions

View File

@ -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