You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Duplicate FigureWidget import code in graph_objects and graph_objs #5849
The FigureWidget import code is duplicated in graph_objects and graph_objs.
Steps to reproduce
Open codegen/__init__.py and find optional_figure_widget_import.
Note that the codegen passes the string to write_init_py for graph_objs and to build_from_imports_py for graph_objects.
Open plotly/graph_objs/__init__.py and plotly/graph_objects/__init__.py.
Note the identical FigureWidget blocks at the end of each file.
Notes
The codegen writes the same optional FigureWidget import block into two generated files: plotly/graph_objs/__init__.py and plotly/graph_objects/__init__.py
graph_objects already re-exports every other class from graph_objs, including Figure. FigureWidget can follow the same path, because graph_objs handles the optional ipywidgets import and the missing_* fallback.
Any fix should not change behavior. This is just about removing duplicate code.
Activity