matplotlib / matplotlib/cmocean
Submodule plots is in `__all__` but not imported in `__init__.py`
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 269
- 派生
- 54
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
This might be deliberate but it seems that the submodule plots is not imported in the __init__.py but is included in __all__.
I can see there are some optional dependencies for some of the functions but their imports are only inside the concerned functions.
That means that if someone wants to use the plots submodule they would need to explicitly import it, which seems a bit strange when the documentation has this:
import cmocean
cmocean.plots.plot_gallery()
Which currently gives:
AttributeError: module 'cmocean' has no attribute 'plots'
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 package init.py 开始,将其中针对 plots 的 all 条目与文档中的 import 示例进行比较。验证先执行 import cmocean,再执行 cmocean.plots.plot_gallery() 时的当前行为。当文档中的访问方式不再引发 AttributeError 时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100