Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:
autoupdate_commit_msg: "⬆️ `pre-commit-ci`自动升级"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
rev: v0.16.1
hooks:
- id: ruff
args: [--fix]
Expand All @@ -20,7 +20,7 @@ repos:

- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.11.17
rev: 0.12.1
hooks:
- id: uv-lock
- id: uv-export
28 changes: 14 additions & 14 deletions VAUID/utils/api/model/asset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, Optional, TypedDict
from typing import Any, TypedDict


# --- 资金相关 (Money) ---
Expand All @@ -15,7 +15,7 @@ class MoneyData(TypedDict):
more: str
intent: str
show_new_icon: bool
list: List[MoneyItem]
list: list[MoneyItem]


# --- 英雄相关 (Agent) ---
Expand All @@ -32,7 +32,7 @@ class AgentItem(TypedDict):
unlock_time: str
lock_status: int
intent: str
record_stones: Optional[Any]
record_stones: Any | None
is_record_stones_agent: bool
icon_grey: str

Expand All @@ -44,7 +44,7 @@ class AgentData(TypedDict):
more: str
intent: str
show_new_icon: bool
list: List[AgentItem]
list: list[AgentItem]


# --- 皮肤图鉴相关 (Skin) ---
Expand Down Expand Up @@ -75,7 +75,7 @@ class SkinData(TypedDict):
more: str
intent: str
show_new_icon: bool
list: List[SkinItem]
list: list[SkinItem]


# --- 收藏品相关 (Spray, Card, Charm) ---
Expand All @@ -94,7 +94,7 @@ class CollectionData(TypedDict):
more: str
intent: str
show_new_icon: bool
list: List[CollectionItem]
list: list[CollectionItem]


# --- 枪卡相关 (Skin Card) ---
Expand All @@ -111,15 +111,15 @@ class EvolutionConf(TypedDict):
desc: str
required_task_num: str
resource_imgname: str
resource_conf: Optional[ResourceConf]
index: Optional[int]
resource_conf: ResourceConf | None
index: int | None


class UpgradeConf(TypedDict):
icon: str
unlock_icon: str
task_id: str
index: Optional[int]
index: int | None


class SkinCardItem(TypedDict):
Expand All @@ -128,7 +128,7 @@ class SkinCardItem(TypedDict):
bg_img: str
list_img: str
skin_limit: int
skin_list_str: List[str]
skin_list_str: list[str]
name: str
desc: str
sub_desc: str
Expand All @@ -139,7 +139,7 @@ class SkinCardItem(TypedDict):
limit_num: int
resource_link: str
resource_type: str
resource_img_name_list: List[Any]
resource_img_name_list: list[Any]
resource_imgname_list: str
status: int
acquire_time: int
Expand All @@ -148,8 +148,8 @@ class SkinCardItem(TypedDict):
upgrade_conf: str
evolution_conf: str
base_resource: str
upgrade_conf_list: List[UpgradeConf]
evolution_conf_list: List[EvolutionConf]
upgrade_conf_list: list[UpgradeConf]
evolution_conf_list: list[EvolutionConf]
base_resource_conf: ResourceConf
is_lock: bool
is_wear: bool
Expand All @@ -163,7 +163,7 @@ class SkinCardData(TypedDict):
more: str
intent: str
show_new_icon: bool
list: List[SkinCardItem]
list: list[SkinCardItem]


# --- 简单模块 (Skin Assemble, Stone Overview) ---
Expand Down
96 changes: 48 additions & 48 deletions VAUID/utils/api/models.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
from typing import List, Literal, Optional, TypedDict
from typing import Literal, TypedDict


class LoginData(TypedDict):
openid: List[str]
openid: list[str]
"""用户的 id"""
appid: List[str]
appid: list[str]
"""用户的 appid"""
access_token: List[str]
access_token: list[str]
"""用户的 access_token"""
pay_token: List[str]
key: List[str]
browser: List[str]
pay_token: list[str]
key: list[str]
browser: list[str]
"""0"""
browser_error: List[str]
browser_error: list[str]
"""0"""
status_os: List[str]
sdkv: List[str]
status_machine: List[str]
status_os: list[str]
sdkv: list[str]
status_machine: list[str]
"""用户的 status_machine"""
update_auth: List[str]
update_auth: list[str]
"""1"""
has_auth: List[str]
has_auth: list[str]
"""1"""
auth_time: List[str]
page_type: List[str]
auth_time: list[str]
page_type: list[str]
"""1"""
redirect_uri_key: List[str]
redirect_uri_key: list[str]


class ResultInfo(TypedDict):
Expand All @@ -48,13 +48,13 @@ class GameInfo(TypedDict):
"""VA"""
level: int
"""游戏等级"""
tier: Optional[str]
tier: str | None
"""段位"""
gameColor: str
"""游戏颜色?"""
content: Optional[str]
content: str | None
"""游戏段位内容"""
gameId: Optional[str]
gameId: str | None
"""不知道"""

league_point: str
Expand All @@ -74,7 +74,7 @@ class SummonerInfo(TypedDict):
"""背景图 url"""
appNum: str
"""qq 号"""
gameInfoList: List[GameInfo]
gameInfoList: list[GameInfo]


class FeedBase(TypedDict):
Expand Down Expand Up @@ -106,13 +106,13 @@ class InfoBody(TypedDict):
"""默认不是不知道是啥"""
isVip: bool
"""默认 false"""
tag: List[Tag_point]
tag: list[Tag_point]
isOnline: bool
"""是否在线"""


class InfoBodyList(TypedDict):
userList: List[InfoBody]
userList: list[InfoBody]


class FeedNews(TypedDict):
Expand Down Expand Up @@ -165,15 +165,15 @@ class tc(TypedDict):


class LeftData(TypedDict):
list: List[tc]
list: list[tc]
image_url: str
"""段位图片"""
title: str
"""段位名称"""


class RightData(TypedDict):
list: List[tc]
list: list[tc]
image_url: str
"""武器图片"""
title: str
Expand Down Expand Up @@ -213,11 +213,11 @@ class CardUrl(TypedDict):
"""分享或复制按钮 url"""
qr_code_url: str
"""二维码"""
left_data: Optional[LeftData]
middle_data: Optional[tc]
left_data: LeftData | None
middle_data: tc | None
"""KAST"""
right_data: Optional[RightData]
round_win_rate: Optional[tc]
right_data: RightData | None
round_win_rate: tc | None
"""回合胜率"""
card_switch_tips: str
"""无"""
Expand All @@ -231,7 +231,7 @@ class CardInfo(TypedDict):
has_role: int
"""是否有角色?"""
role_info: RoleInfo
tools: List[Tool]
tools: list[Tool]
scene: str
"""场景"""
card_visible: int
Expand All @@ -246,7 +246,7 @@ class CardInfo(TypedDict):


class ListInfo(TypedDict):
list: List[tc]
list: list[tc]
image_url: str
"""图片"""
title: str
Expand Down Expand Up @@ -463,7 +463,7 @@ class Battle(TypedDict):
"""是否好友"""
competitive_tier: Competitve
"""排位信息"""
achievement: List[Achievement]
achievement: list[Achievement]
"""成就信息"""


Expand All @@ -472,7 +472,7 @@ class ValBattle(TypedDict):

next_baton: str
"""下一把武器 uid"""
battle_list: List[Battle]
battle_list: list[Battle]
msg: str
"""两个月内的记录"""

Expand All @@ -486,7 +486,7 @@ class Header(TypedDict):
- 1006 能力图
"""
title: str
tips: List[str]
tips: list[str]
"""提示信息"""
isShowIcon: bool
"""是否显示图标"""
Expand All @@ -497,17 +497,17 @@ class tv(TypedDict):

title: str
"""标题 | 变化趋势"""
values: List[int]
values: list[int]
"""段位趋势"""
heights: List[int]
heights: list[int]
"""段位高度"""
x: List[int]
x: list[int]
"""段位坐标 (0123456789)"""
y: List[int]
y: list[int]
"""段位坐标 (段位)"""
rate: List[List[int]]
rate: list[list[int]]
"""段位坐标 (xy)"""
max_point: List[int]
max_point: list[int]
"""段位最高坐标 (xy)"""
max_value_text: str
"""段位最高名称"""
Expand All @@ -525,11 +525,11 @@ class Radar(TypedDict):
sub_tab_name: str
"""位置名称 | 决斗 | 先锋 | 控场 | 哨卫"""
desc: str
data_array: List[str]
data_array: list[str]
"""六边形数据值"""
proportion_array: List[int]
proportion_array: list[int]
"""六边形数据长度"""
desc_array: List[str]
desc_array: list[str]
"""六边形数据名称"""

tips_bg_color: str
Expand All @@ -547,7 +547,7 @@ class ts(TypedDict):


class RadarChart(TypedDict):
tabs: List[Radar]
tabs: list[Radar]
"""同段位水平"""
player_dict: Radar
"""个人水平"""
Expand All @@ -564,15 +564,15 @@ class RadarChart(TypedDict):
class Body(TypedDict):
"""头部信息"""

first_list: List[tc]
first_list: list[tc]
"""
- 当前段位 白银
- 赛季最高 白银
- 近期表现 A
"""
line_chart_list: List[tv]
line_chart_list: list[tv]
"""段位趋势 2 个"""
second_list: List[tc]
second_list: list[tc]
"""
- 胜率
- 平均战斗
Expand All @@ -583,7 +583,7 @@ class Body(TypedDict):

radar_chart: RadarChart
"""能力图"""
shooting: List[ts]
shooting: list[ts]
"""
- 精准击败
- 身体
Expand Down Expand Up @@ -705,4 +705,4 @@ class Shop(TypedDict):
"""商店结束时间戳"""
cur_ts: float
"""商店当前时间戳"""
list: List[ShopDay]
list: list[ShopDay]
Loading