Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
17400bc852 Fix tetrio v2 template crash for users with PERCENTILEINVARIANT (rank_type=7) achievements
Co-authored-by: shoucandanghehe <51957264+shoucandanghehe@users.noreply.github.com>
2026-02-23 07:07:22 +00:00
copilot-swe-agent[bot]
9594278c07 Initial plan 2026-02-23 06:54:49 +00:00
9 changed files with 472 additions and 494 deletions

View File

@@ -7,7 +7,7 @@ ci:
autoupdate_commit_msg: ':arrow_up: auto update by pre-commit hooks'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
rev: v0.15.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

View File

@@ -33,11 +33,6 @@ class Distinguishment(BaseModel):
type: str
class OldUsernames(BaseModel):
username: str
ts: datetime
class Data(BaseModel):
id: str = Field(default=..., alias='_id')
username: str
@@ -70,7 +65,6 @@ class Data(BaseModel):
achievements: list[int]
ar: int
ar_counts: ArCounts
oldusernames: list[OldUsernames]
class UserInfoSuccess(BaseSuccessModel):

View File

@@ -26,6 +26,7 @@ from ....utils.render.schemas.v2.tetrio.user.info import (
Zenith,
)
from ..api import Player
from ..api.schemas.summaries.achievements import RankType
from ..api.schemas.summaries.league import InvalidData, NeverPlayedData, NeverRatedData
from .tools import flow_to_history, handling_special_value
@@ -122,6 +123,7 @@ async def make_query_image_v2(player: Player) -> bytes:
total=i.total,
)
for i in achievements.data
if i.rank_type != RankType.PERCENTILEINVARIANT
],
playtime=play_time,
join_at=user_info.data.ts,

View File

@@ -56,7 +56,7 @@ async def _(nb_user: User, event_session: Uninfo, interface: QryItrface):
raw=await render_image(
Bind(
platform='TETR.IO',
type='unbind',
type='unlink',
user=People(
avatar=str(
URL(f'http://{netloc}/host/resource/tetrio/avatars/{user.ID}')

View File

@@ -47,7 +47,7 @@ async def _(
raw=await render_image(
Bind(
platform='TOP',
type='unbind',
type='unlink',
user=People(
avatar=await get_avatar(
event_session.user,

View File

@@ -46,7 +46,7 @@ async def _(
raw=await render_image(
Bind(
platform='TOS',
type='unbind',
type='unlink',
user=People(
avatar=await get_avatar(event_session.user, 'Data URI', None),
name=user.name,

View File

@@ -12,7 +12,7 @@ class Bind(Base):
return 'v1/binding'
platform: Literal['TETR.IO', 'TOP', 'TOS']
type: Literal['success', 'unknown', 'unbind', 'unverified', 'error']
type: Literal['success', 'unknown', 'unlink', 'unverified', 'error']
user: People
bot: People
prompt: str

View File

@@ -2,7 +2,7 @@
[project]
name = "nonebot-plugin-tetris-stats"
version = "1.12.1"
version = "1.12.0"
description = "一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件"
readme = "README.md"
authors = [{ name = "shoucandanghehe", email = "wallfjjd@gmail.com" }]
@@ -168,7 +168,7 @@ reportImplicitAbstractClass = 'error'
enableTypeIgnoreComments = false
[tool.bumpversion]
current_version = "1.12.1"
current_version = "1.12.0"
tag = true
sign_tags = true
tag_name = "{new_version}"

944
uv.lock generated

File diff suppressed because it is too large Load Diff