-
Notifications
You must be signed in to change notification settings - Fork 3
✨ 迁移到新模板 #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ 迁移到新模板 #536
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates several game modules to a new template by replacing legacy parameters with updated ones and integrating new language support. Key changes include replacing "status" with "type", "command" with "prompt", and adding a _lang parameter via get_lang() across multiple modules, as well as updating schema imports to newer versions.
Reviewed Changes
Copilot reviewed 49 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
nonebot_plugin_tetris_stats/games/tos/unbind.py | Updated binding info keys and added language support. |
nonebot_plugin_tetris_stats/games/tos/query.py | Introduced historical data retrieval with language support and renamed a field in GameData. |
nonebot_plugin_tetris_stats/games/tos/bind.py | Replaced command with prompt and added _lang parameter. |
nonebot_plugin_tetris_stats/games/top/unbind.py | Updated binding payloads with new field names and language support. |
nonebot_plugin_tetris_stats/games/top/query.py | Revised query payloads with trending and language support. |
nonebot_plugin_tetris_stats/games/top/bind.py | Consistent update to prompt fields and language integration. |
nonebot_plugin_tetris_stats/games/tetrio/unbind.py | Adjusted binding payload parameters to match the new template. |
nonebot_plugin_tetris_stats/games/tetrio/record/sprint.py | Fixed render route and added _lang parameter. |
nonebot_plugin_tetris_stats/games/tetrio/record/blitz.py | Added language support to the blitz image rendering. |
nonebot_plugin_tetris_stats/games/tetrio/rank/detail.py, all.py | Integrated _lang parameter into rank rendering payloads. |
nonebot_plugin_tetris_stats/games/tetrio/query (v1 & v2) | Migrated query image generation to use updated schema and language support. |
nonebot_plugin_tetris_stats/games/tetrio/list.py | Updated list display schema and added language support. |
nonebot_plugin_tetris_stats/games/tetrio/bind.py | Changed binding parameters and integrated language support. |
nonebot_plugin_tetris_stats/games/tetrio/api/schemas/summaries/zenith.py | Updated type hint for revolution in schema. |
Files not reviewed (3)
- nonebot_plugin_tetris_stats/i18n/.lang.schema.json: Language not supported
- nonebot_plugin_tetris_stats/i18n/.template.json: Language not supported
- nonebot_plugin_tetris_stats/i18n/en-US.json: Language not supported
Comments suppressed due to low confidence (1)
nonebot_plugin_tetris_stats/games/tetrio/query/v1.py:95
- Hardcoding '_lang' as 'zh-CN' breaks consistency with other modules that invoke get_lang(); consider using get_lang() for consistent language determination.
_lang='zh-CN',
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates to the new template by updating field names, function calls, and schema imports across the various game modules.
- Renames binding status fields from “status” to “type” and command fields to “prompt”.
- Introduces the _lang parameter from get_lang() consistently in rendering calls.
- Updates import paths and schema references to align with the new project structure.
Reviewed Changes
Copilot reviewed 49 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
nonebot_plugin_tetris_stats/games/tos/unbind.py | Changed binding field and added _lang parameter. |
nonebot_plugin_tetris_stats/games/tos/query.py | Renamed variables and added historical data fetching with proper language injection. |
nonebot_plugin_tetris_stats/games/tos/bind.py | Updated binding parameters and language injection. |
nonebot_plugin_tetris_stats/games/top/* | Similar rename updates and added language support. |
nonebot_plugin_tetris_stats/games/tetrio/* | Updated schema imports, binding, query, and record rendering to the new template. |
Files not reviewed (3)
- nonebot_plugin_tetris_stats/i18n/.lang.schema.json: Language not supported
- nonebot_plugin_tetris_stats/i18n/.template.json: Language not supported
- nonebot_plugin_tetris_stats/i18n/en-US.json: Language not supported
Comments suppressed due to low confidence (1)
nonebot_plugin_tetris_stats/games/tetrio/query/v1.py:44
- [nitpick] The variable name 'dsps' is not very descriptive; consider renaming it to a more meaningful name such as 'delta_per_second' if that better represents its purpose.
dsps: float
value_max, value_min = get_value_bounds([i.tr for i in histories]) | ||
split_value, offset = get_split(value_max, value_min) | ||
values = get_value_bounds([i.score for i in histories]) | ||
split_value, offset = get_split(values, TR_MAX, TR_MIN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the updated get_split function accepts three arguments as used here and that TR_MAX and TR_MIN are correctly defined for its intended usage.
Copilot uses AI. Check for mistakes.
No description provided.