[BUG]: Duplicate `FigureWidget` import code in `graph_objects` and `graph_objs`
維護者通常 2 天內回覆
評估
研究方向
從 codegen/__init__.py 中的 optional_figure_widget_import 開始,接著閱讀 write_init_py 和 build_from_imports_py 如何產生兩個套件初始化檔。比較 plotly/graph_objs/__init__.py 和 plotly/graph_objects/__init__.py 中的 FigureWidget 區塊;完成標準是產生的程式碼保留現有的選擇性 ipywidgets 匯入和缺少相依套件時的備援機制,同時只輸出一次該區塊。檢查 issue #5238 中引用的備援測試。
由索引模型根據 Issue 內容生成。
描述
Description
The FigureWidget import code is duplicated in graph_objects and graph_objs.
Steps to reproduce
- Open
codegen/__init__.pyand findoptional_figure_widget_import. - Note that the codegen passes the string to
write_init_pyforgraph_objsand tobuild_from_imports_pyforgraph_objects. - Open
plotly/graph_objs/__init__.pyandplotly/graph_objects/__init__.py. - Note the identical
FigureWidgetblocks at the end of each file.
Notes
- The codegen writes the same optional
FigureWidgetimport block into two generated files:plotly/graph_objs/__init__.pyandplotly/graph_objects/__init__.py graph_objectsalready re-exports every other class fromgraph_objs, includingFigure.FigureWidgetcan follow the same path, becausegraph_objshandles the optionalipywidgetsimport and themissing_*fallback.- Any fix should not change behavior. This is just about removing duplicate code.
- Related:
- #3779 (closed, edited the generated file by hand)
- #5238 (test for the missing
FigureWidgetfallback)
- 主要語言
- Python
- 星號
- 18.9k
- 分支
- 2.9k
- 平均合併
- 1 天 22 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.py 的其他 Issue
-
to_typed_array_spec encodes bdata in host byte order; plotly.js always decodes it as little-endian可能已有人在做 @Vikram12301 於 11 天前認領。 未關閉bug P3 size: 1
難度 2/5 1-3 小時 新手友好度 79/100
plotly/plotly.py#5837 · 1 則留言 ·
維護者通常 2 天內回覆
-
[BUG]: NaT inside a datetime64 array serializes as the string "NaT" instead of null可能已有人在做 @senanurcetin 於 13 天前認領。 未關閉bug P3 size: 1
難度 2/5 1-3 小時 新手友好度 82/100
plotly/plotly.py#5829 · 3 則留言 ·
維護者通常 2 天內回覆
-
[BUG]: Integer and string properties reject NumPy scalars可能已有人在做 @RaphaelFakhri 於 14 天前認領。 未關閉bug P3 size: 1
難度 2/5 1-3 小時 新手友好度 70/100
plotly/plotly.py#5827 · 1 則留言 ·
維護者通常 2 天內回覆
-
[BUG]: Single-color requests raise ZeroDivisionError in palette helpers可能已有人在做 @MokiMeow 於 23 天前認領。 未關閉bug P3 size: 1
難度 2/5 1-3 小時 新手友好度 82/100
plotly/plotly.py#5805 · 1 則留言 ·
維護者通常 2 天內回覆
-
[BUG]: Unnecessary `UserWarning` when using `fig.write_image()` with `kaleido.start_sync_server()`可能已有人在做 @jayzhou2309 於 32 天前認領。 未關閉bug P3 size: 1
難度 2/5 1-3 小時 新手友好度 74/100
plotly/plotly.py#5786 · 1 則留言 ·
維護者通常 2 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 78/100
elviskahoro/sdk-python-attio#144 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
RenyiELBO raises TypeError when model has no sample sites可能已有人在做 @alibb007 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
-
[Bug]: Four evaluation scripts unpack init_memmachine_params's five return values into three names未關閉
難度 1/5 1 小時以內 新手友好度 88/100
MemMachine/MemMachine#1911 ·
維護者通常 3 天內回覆