Skip to content

Conversation

@Dt8333
Copy link
Member

@Dt8333 Dt8333 commented Oct 28, 2025


Motivation / 动机

补全类型声明。

Modifications / 改动点

Verification Steps / 验证步骤

Screenshots or Test Results / 运行截图或测试结果

Compatibility & Breaking Changes / 兼容性与破坏性变更

  • 这是一个破坏性变更 (Breaking Change)。/ This is a breaking change.
  • 这不是一个破坏性变更。/ This is NOT a breaking change.

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Sourcery 总结

为 CLI 命令和工具中的函数添加全面的类型注解,以提高代码清晰度和类型覆盖率。

增强功能:

  • cmd_plugcmd_confcmd_initcmd_run 模块中的 CLI 命令的参数和返回类型添加注解
  • 为嵌套的辅助函数和版本比较器工具添加类型提示
  • 在插件工具中为 Git 仓库辅助函数添加返回类型提示
Original summary in English

Summary by Sourcery

Add comprehensive type annotations to functions across CLI commands and utilities to improve code clarity and typing coverage.

Enhancements:

  • Annotate parameters and return types for CLI commands in cmd_plug, cmd_conf, cmd_init, and cmd_run modules
  • Add type hints for nested helper functions and version comparator utilities
  • Add return type hint for git repository helper in plugin utilities

@LIghtJUNction
Copy link
Member

太好了

@Dt8333
Copy link
Member Author

Dt8333 commented Oct 28, 2025

?别急,在写。先占坑。

@LIghtJUNction
Copy link
Member

我知道

将FunctionTool类的__dict__方法重命名为to_dict,修复Pylance报告的类型不兼容错误
@LIghtJUNction
Copy link
Member

加油

@Dt8333
Copy link
Member Author

Dt8333 commented Oct 31, 2025

暂停。
先去开新坑。

被已有但有缺陷的类型声明逼疯了(

@LIghtJUNction
Copy link
Member

暂停。
先去开新坑。

被已有但有缺陷的类型声明逼疯了(

类型标注,只能开始的时候就标好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants