python / python/typeshed

Automatization idea: find duplicated constants

未关闭
#7,067 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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:

  1. Use re-export as well (correct option)
  2. 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 python/typeshed 的 pull request 7065 中的上下文开始,审查相关模块如何重新导出常量。然后确定一个非阻塞 helper 的范围,该 helper 用于查找重复的常量名称并建议复用;当方法和预期行为定义得足够明确、可以进行实现时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。