Automatization idea: find duplicated constants
未关闭
还没有人认领这个 Issue。
project: policy
- 主要语言
- Python
- 星标
- 5.1k
- 派生
- 2.1k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 82
描述
Context: https://github.com/python/typeshed/pull/7065
Sometimes python / stubs do re-export constans from other modules.
In this case we can:
- Use re-export as well (correct option)
- Duplicate these constants (ok-ish, but not great)
Right now we do nothing to detect the second case.
I guess, that we can improve this!
We can write some kind of non-blocking helper who searches related modules for constants with the same names and suggests to re-use them if needed.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 python/typeshed 的 pull request 7065 中的上下文开始,审查相关模块如何重新导出常量。然后确定一个非阻塞 helper 的范围,该 helper 用于查找重复的常量名称并建议复用;当方法和预期行为定义得足够明确、可以进行实现时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100