stub for sklearn.datasets.load_iris is missing a return type option
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
Search the sklearn.datasets stubs for the load_iris entry point and compare its return annotation with the linked documentation. Update the annotation to represent the return_X_y alternatives, then run the repository’s stub or type-check validation if available; it is done when both documented return forms are represented.
由索引模型根据 Issue 内容生成。
描述
The Returns section of the docstring for sklearn.datasets.load_iris() has two options:
- An
sklearn.utils.Bunch, ifreturn_X_yisFalse - A
tuple[ndarray, ndarray]ifreturn_X_yisTrue
The type stub for the function is
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> tuple[Bunch, tuple]: ...
but I believe it should be:
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> Bunch | tuple[ndarray, ndarray]: ...
or at least:
def load_iris(*, return_X_y: bool = False, as_frame: bool = False) -> Bunch | tuple: ...
which might be all we can get with parsing.
This might not be the only case of this in the codebase, but unfortunately I just have enough time to write this ticket. Normally I like to come with a bit more information, sorry about that.
- 主要语言
- Python
- 星标
- 304
- 派生
- 104
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/python-type-stubs 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
microsoft/python-type-stubs#395 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
microsoft/python-type-stubs#392 ·
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/python-type-stubs#315 · 1 条评论 ·
-
Unparameterized `np.ndarray` typings produce "Type of ... is partially unknown" Pyright type errors. 未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
microsoft/python-type-stubs#309 · 4 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
microsoft/python-type-stubs#211 · 8 条评论 · 29 个 reaction ·
查看 microsoft/python-type-stubs 的全部 Issue
相似的 Issue
-
bug ci good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
documentation
难度 2/5 半天 新手友好度 62/100
inmanta/inmanta-core#10835 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
-
sponsored
难度 2/5 1-3 小时 新手友好度 65/100