Submodule plots is in `__all__` but not imported in `__init__.py`
还没有人认领这个 Issue。
评估
调研方向
从 package init.py 开始,将其中针对 plots 的 all 条目与文档中的 import 示例进行比较。验证先执行 import cmocean,再执行 cmocean.plots.plot_gallery() 时的当前行为。当文档中的访问方式不再引发 AttributeError 时即表示完成。
由索引模型根据 Issue 内容生成。
描述
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'
- 主要语言
- Python
- 星标
- 269
- 派生
- 54
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/cmocean 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 45/100
matplotlib/cmocean#120 ·
-
难度 2/5 1-3 小时 新手友好度 50/100
matplotlib/cmocean#119 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 52/100
matplotlib/cmocean#118 ·
-
难度 3/5 1-2 天 新手友好度 45/100
matplotlib/cmocean#116 ·
-
难度 3/5 1-2 天 新手友好度 35/100
matplotlib/cmocean#115 ·
查看 matplotlib/cmocean 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
bot-found bug priority: P3
难度 2/5 1-3 小时 新手友好度 84/100
madenvel/KalinkaPlayer#179 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
ls1intum/edutelligence#1098 ·
维护者通常 1 天内回复