Infer base classes in signatures
还没有人认领这个 Issue。
评估
调研方向
该 issue 未指定文件或测试。首先定位签名推断和 profiling 的入口点,然后检查观测到的类型如何变成 Union 注解;完成标准是在适用时使用共同的非 object 基类,并在没有适用的有意义基类时保留 Union。
由索引模型根据 Issue 内容生成。
描述
If a function gets called with two different argument types A and B that have a common base class C, we may want to infer C as the argument type instead of Union[A, B] -- unless C is object or some other type that isn't interesting.
To implement this, we could record the MROs of all types in the profile.
- 主要语言
- Python
- 星标
- 1.4k
- 派生
- 59
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dropbox/pyannotate 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
dropbox/pyannotate#124 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
dropbox/pyannotate#123 ·
-
难度 5/5 一周以上 新手友好度 25/100
dropbox/pyannotate#115 ·
-
难度 3/5 1-2 天 新手友好度 35/100
dropbox/pyannotate#109 ·
-
难度 5/5 一周以上 新手友好度 25/100
dropbox/pyannotate#103 · 6 条评论 · 1 个 reaction ·
查看 dropbox/pyannotate 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
SwiftKickMobile/skai#84 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jxxghp/MoviePilot#7070 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
flop-labs/technocore-chat#997 ·
维护者通常 1 天内回复
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复