-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Versions 2.7.0-2.7.2
If the first plotpy.tools is directly (or indirectly) imported, there is a circular import through annotation to shape to plot to manager to tools:
>>> import plotpy.tools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/.local/lib/python3.12/site-packages/plotpy/tools/__init__.py", line 6, in <module>
from .annotation import (
File "/tmp/.local/lib/python3.12/site-packages/plotpy/tools/annotation.py", line 17, in <module>
from plotpy.tools.shape import (
File "/tmp/.local/lib/python3.12/site-packages/plotpy/tools/shape.py", line 31, in <module>
from plotpy.plot import BasePlot
File "/tmp/.local/lib/python3.12/site-packages/plotpy/plot/__init__.py", line 7, in <module>
from .manager import PlotManager
File "/tmp/.local/lib/python3.12/site-packages/plotpy/plot/manager.py", line 16, in <module>
from plotpy.tools import (
ImportError: cannot import name 'AboutTool' from partially initialized module 'plotpy.tools' (most likely due to a circular import) (/tmp/.local/lib/python3.12/site-packages/plotpy/tools/__init__.py)
Explicitly importing plotpy.plot.manager first, resolves this.
Metadata
Metadata
Assignees
Labels
No labels