Skip to content

Commit 61bb49e

Browse files
committed
refactor(codegen): inline the FigureWidget re-export per review
1 parent 6ebc63d commit 61bb49e

2 files changed

Lines changed: 6 additions & 84 deletions

File tree

‎codegen/__init__.py‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,13 @@ def __getattr__(import_name):
304304

305305
# Output graph_objects.py alias
306306
graph_objects_rel_classes = [
307-
"..graph_objs." + rel_path.split(".")[-1]
308-
for rel_path in datatype_rel_class_imports[()]
307+
*(
308+
"..graph_objs." + rel_path.split(".")[-1]
309+
for rel_path in datatype_rel_class_imports[()]
310+
),
311+
# graph_objs owns the optional ipywidgets import and the fallback
312+
"..graph_objs.FigureWidget",
309313
]
310-
# FigureWidget is owned by graph_objs, which handles the optional
311-
# ipywidgets import and the missing_* fallback. Re-export it from
312-
# graph_objs like every other class instead of duplicating the optional
313-
# import block in graph_objects.
314-
graph_objects_rel_classes.append("..graph_objs.FigureWidget")
315314
graph_objects_rel_modules = [
316315
"..graph_objs." + rel_module.split(".")[-1]
317316
for rel_module in datatype_rel_module_imports[()]

‎tests/test_core/test_figure_widget_backend/test_figurewidget_reexport.py‎

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)