-
Notifications
You must be signed in to change notification settings - Fork 607
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
🐛 修复私聊无法使用道具 #1697
🐛 修复私聊无法使用道具 #1697
Conversation
Sourcery 的审查指南此拉取请求解决了无法在私人聊天中使用道具的相关错误。更改涉及修改两个文件中的类型注解,以便更灵活地处理用户和群组 ID,可能在私人聊天场景中启用道具的使用。 ShopParam 和相关函数的更新类图classDiagram
class ShopParam {
+str|None goods_name
+str|None user_id
+str|None group_id
+Any bot
}
class Goods {
...
}
class EventSession {
...
}
class UserConsole {
+static get_user(id1, platform)
}
class SignUser {
+static get_or_create()
}
ShopParam --> Goods
EventSession --> UserConsole
EventSession --> SignUser
note for ShopParam "user_id 和 group_id 类型从 int 改为 str|None"
文件级更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis pull request addresses a bug related to the inability to use props in private chats. The changes involve modifying type annotations in two files to allow for more flexible handling of user and group IDs, potentially enabling the use of props in private chat scenarios. Updated class diagram for ShopParam and related functionsclassDiagram
class ShopParam {
+str|None goods_name
+str|None user_id
+str|None group_id
+Any bot
}
class Goods {
...
}
class EventSession {
...
}
class UserConsole {
+static get_user(id1, platform)
}
class SignUser {
+static get_or_create()
}
ShopParam --> Goods
EventSession --> UserConsole
EventSession --> SignUser
note for ShopParam "user_id and group_id types changed from int to str|None"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
嘿 @HibiKier - 我已经审查了你的更改 - 这里有一些反馈:
总体评论:
- 考虑检查整个代码库中关于 user_id 和 group_id 是整数的任何假设,并确保在整个项目中一致地将这些处理为 str | None 类型。添加注释以解释此更改背后的理由可能对未来的维护有帮助。
这是我在审查期间查看的内容
- 🟢 一般问题:一切看起来都很好
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请点击每条评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English
Hey @HibiKier - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider reviewing the entire codebase for any assumptions about user_id and group_id being integers, and ensure consistent handling of these as str | None types throughout the project. Adding comments to explain the rationale behind this change could be helpful for future maintenance.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: