From caf6f42178c11cf418293fb22e1be68c8a0d914c Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Mon, 21 Apr 2025 13:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20make=20mypy=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_tetris_stats/games/tos/query.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nonebot_plugin_tetris_stats/games/tos/query.py b/nonebot_plugin_tetris_stats/games/tos/query.py index 5e3b577..ac9a1ed 100644 --- a/nonebot_plugin_tetris_stats/games/tos/query.py +++ b/nonebot_plugin_tetris_stats/games/tos/query.py @@ -260,6 +260,8 @@ async def make_query_image(user_info: UserInfoSuccess, game_data: GameData, even if user_info.data.pb_sprint != '2147483647' else 'N/A' ) + data = handle_history_data(await get_historical_data(user_info.data.teaid)) + values = get_value_bounds([i.score for i in data]) async with HostPage( await render( 'v1/tos/info', @@ -272,8 +274,8 @@ async def make_query_image(user_info: UserInfoSuccess, game_data: GameData, even ), multiplayer=Multiplayer( history=History( - data=(data := handle_history_data(await get_historical_data(user_info.data.teaid))), - max_value=(values := get_value_bounds([i.score for i in data])).value_max, + data=data, + max_value=values.value_max, min_value=values.value_min, split_interval=(split := get_split(value_bound=values, min_value=0)).split_value, offset=split.offset,