mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
🚨 修复 pyright 类型报错
This commit is contained in:
@@ -3,6 +3,7 @@ from hashlib import md5
|
|||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
from arclet.alconna import Arg, ArgFlag
|
from arclet.alconna import Arg, ArgFlag
|
||||||
|
from nepattern import parser # type: ignore[import-untyped]
|
||||||
from nonebot_plugin_alconna import Args, Subcommand
|
from nonebot_plugin_alconna import Args, Subcommand
|
||||||
from nonebot_plugin_alconna.uniseg import UniMessage
|
from nonebot_plugin_alconna.uniseg import UniMessage
|
||||||
from nonebot_plugin_orm import get_session
|
from nonebot_plugin_orm import get_session
|
||||||
@@ -27,7 +28,7 @@ command.add(
|
|||||||
Args(
|
Args(
|
||||||
Arg(
|
Arg(
|
||||||
'account',
|
'account',
|
||||||
get_player,
|
parser(get_player),
|
||||||
notice='TETR.IO 用户名 / ID',
|
notice='TETR.IO 用户名 / ID',
|
||||||
flags=[ArgFlag.HIDDEN],
|
flags=[ArgFlag.HIDDEN],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from arclet.alconna import Arg
|
from arclet.alconna import Arg
|
||||||
|
from nepattern import parser # type: ignore[import-untyped]
|
||||||
from nonebot_plugin_alconna import Option, Subcommand
|
from nonebot_plugin_alconna import Option, Subcommand
|
||||||
from nonebot_plugin_alconna.uniseg import UniMessage
|
from nonebot_plugin_alconna.uniseg import UniMessage
|
||||||
from nonebot_plugin_orm import async_scoped_session
|
from nonebot_plugin_orm import async_scoped_session
|
||||||
@@ -18,7 +19,7 @@ command.add(
|
|||||||
'config',
|
'config',
|
||||||
Option(
|
Option(
|
||||||
'--default-template',
|
'--default-template',
|
||||||
Arg('template', Template, notice='模板版本'),
|
Arg('template', parser(Template), notice='模板版本'),
|
||||||
alias=['-DT', 'DefaultTemplate'],
|
alias=['-DT', 'DefaultTemplate'],
|
||||||
help_text='设置默认查询模板',
|
help_text='设置默认查询模板',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from arclet.alconna import Arg, ArgFlag, Args, Subcommand
|
from arclet.alconna import Arg, ArgFlag
|
||||||
from nonebot_plugin_alconna import At
|
from nepattern import parser # type: ignore[import-untyped]
|
||||||
|
from nonebot_plugin_alconna import Args, At, Subcommand
|
||||||
|
|
||||||
from ...utils.exception import MessageFormatError
|
from ...utils.exception import MessageFormatError
|
||||||
from ...utils.typing import Me
|
from ...utils.typing import Me
|
||||||
@@ -22,7 +23,7 @@ command.add(
|
|||||||
Args(
|
Args(
|
||||||
Arg(
|
Arg(
|
||||||
'account',
|
'account',
|
||||||
get_player,
|
parser(get_player),
|
||||||
notice='TOP 用户名 / ID',
|
notice='TOP 用户名 / ID',
|
||||||
flags=[ArgFlag.HIDDEN],
|
flags=[ArgFlag.HIDDEN],
|
||||||
)
|
)
|
||||||
@@ -34,13 +35,13 @@ command.add(
|
|||||||
Args(
|
Args(
|
||||||
Arg(
|
Arg(
|
||||||
'target',
|
'target',
|
||||||
At | Me,
|
parser(At | Me),
|
||||||
notice='@想要查询的人 / 自己',
|
notice='@想要查询的人 / 自己',
|
||||||
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
||||||
),
|
),
|
||||||
Arg(
|
Arg(
|
||||||
'account',
|
'account',
|
||||||
get_player,
|
parser(get_player),
|
||||||
notice='TOP 用户名',
|
notice='TOP 用户名',
|
||||||
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from arclet.alconna import Arg, ArgFlag, Args, Subcommand
|
from arclet.alconna import Arg, ArgFlag
|
||||||
from nonebot_plugin_alconna import At
|
from nepattern import parser # type: ignore[import-untyped]
|
||||||
|
from nonebot_plugin_alconna import Args, At, Subcommand
|
||||||
|
|
||||||
from ...utils.exception import MessageFormatError
|
from ...utils.exception import MessageFormatError
|
||||||
from ...utils.typing import Me
|
from ...utils.typing import Me
|
||||||
@@ -27,7 +28,7 @@ command.add(
|
|||||||
Args(
|
Args(
|
||||||
Arg(
|
Arg(
|
||||||
'account',
|
'account',
|
||||||
get_player,
|
parser(get_player),
|
||||||
notice='茶服 用户名 / ID',
|
notice='茶服 用户名 / ID',
|
||||||
flags=[ArgFlag.HIDDEN],
|
flags=[ArgFlag.HIDDEN],
|
||||||
)
|
)
|
||||||
@@ -39,13 +40,13 @@ command.add(
|
|||||||
Args(
|
Args(
|
||||||
Arg(
|
Arg(
|
||||||
'target',
|
'target',
|
||||||
At | Me,
|
parser(At | Me),
|
||||||
notice='@想要查询的人 / 自己',
|
notice='@想要查询的人 / 自己',
|
||||||
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
||||||
),
|
),
|
||||||
Arg(
|
Arg(
|
||||||
'account',
|
'account',
|
||||||
get_player,
|
parser(get_player),
|
||||||
notice='茶服 用户名 / TeaID',
|
notice='茶服 用户名 / TeaID',
|
||||||
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user