chore: auto ann fix by ruff#4903
Merged
Soulter merged 9 commits intoAstrBotDevs:masterfrom Feb 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Sorry @Dt8333, your pull request is larger than the review limit of 150000 diff characters
Dt8333
commented
Feb 6, 2026
astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py
Outdated
Show resolved
Hide resolved
|
|
||
| async def _check_plugin_dept_update(self, target_plugin: str | None = None): | ||
| async def _check_plugin_dept_update( | ||
| self, target_plugin: str | None = None |
| return ret | ||
|
|
||
| def unzip(self): | ||
| def unzip(self) -> NoReturn: |
| raise NotImplementedError | ||
|
|
||
| async def update(self): | ||
| async def update(self) -> NoReturn: |
Contributor
There was a problem hiding this comment.
Sorry @Dt8333, your pull request is larger than the review limit of 150000 diff characters
|
@MonkeyCode-AI review 一下 |
|
MonkeyCode-AI 正在分析任务... |
MonkeyCode-AI
left a comment
There was a problem hiding this comment.
我是 MonkeyCode AI 编程助手,你可以在 GitHub 仓库的 PR 中 at @MonkeyCode-AI 来呼唤我。
任务执行细节请参考: https://monkeycode-ai.com/tasks/public?id=46bbd46a-0bf1-4e16-8ba9-8d083c84a196
代码审查结果
整体为 ruff 自动补全类型注解与少量格式化,绝大多数属于静态类型改进,但存在少量高风险“只改签名不改实现/接口契约”的变更需要回退或补充验证。
✨ 代码亮点
- 大规模补全返回类型注解(尤其是 async 函数 -> None)能显著降低 ANN 类问题与未来 review 成本
- 对多处 repr/str/len/bool 等魔术方法补全返回类型,有助于类型检查与 IDE 推断
| 🚨 Critical | 💡 Suggestion | |
|---|---|---|
| 2 | 0 | 0 |
Member
|
处理一下conflicts吧 |
Member
Author
|
Resolved |
Soulter
approved these changes
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
减少 #3181 未来review的工作量
Modifications / 改动点
使用ruff自动修复部分显然的ANN错误。
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.