plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

remove duplicate FigureWidget code in graph_objects

Open jvdd opened this issue 3 years ago • 1 comments

This PR removes the logic that is used to import FigureWidget in __init__.py from graph_objects and imports it from ..graph_objs instead

(I might be missing smth in my understanding - but atm I can't think of a reason why you would want exactly the same code in those two files)

jvdd avatar Jun 15 '22 15:06 jvdd

This seems like a reasonable change. I'm not sure why we handle FigureWidget differently than any other imports in this file. Python < 3.7 doesn't support .. imports, which is why we have this special handler, but it's not clear to me why we use the special handler for just FigureWidget and no other import.

In favour of this change to make this file easier to understand 👍 I'd be curious whether this breaks compatibility with <3.6 for some arcane reason though (although to be honest I'm open to requiring Python>=3.8 for Plotly.py in general).

ndrezn avatar Aug 23 '24 14:08 ndrezn