GeezerVison is showing github.com — plotpy.interfaces: moved imports at root level · PlotPyStack/PlotPy@33c29c4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/features/items/reference.rst +3-3Lines changed: 3 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,9 +4,9 @@ Reference | 4 | 4 | Base classes | 5 | 5 | ^^^^^^^^^^^^ | 6 | 6 |
| 7 | | -.. autoclass:: plotpy.interfaces.common.IItemType | 8 | | -.. autoclass:: plotpy.interfaces.common.IBasePlotItem | 9 | | -.. autoclass:: plotpy.interfaces.common.IColormapImageItemType | | 7 | +.. autoclass:: plotpy.interfaces.IItemType | | 8 | +.. autoclass:: plotpy.interfaces.IBasePlotItem | | 9 | +.. autoclass:: plotpy.interfaces.IColormapImageItemType | 10 | 10 |
| 11 | 11 | Curves | 12 | 12 | ^^^^^^ | |
Collapse file Copy file name to clipboard +22Lines changed: 22 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# -*- coding: utf-8 -*- | | 2 | + | | 3 | +# pylint: disable=unused-import | | 4 | +from .items import ( | | 5 | + IBaseImageItem, | | 6 | + IBasePlotItem, | | 7 | + IColormapImageItemType, | | 8 | + ICSImageItemType, | | 9 | + ICurveItemType, | | 10 | + IDecoratorItemType, | | 11 | + IExportROIImageItemType, | | 12 | + IHistDataSource, | | 13 | + IImageItemType, | | 14 | + IItemType, | | 15 | + ISerializableType, | | 16 | + IShapeItemType, | | 17 | + IStatsImageItemType, | | 18 | + ITrackableItemType, | | 19 | + IVoiImageItemType, | | 20 | +) | | 21 | +from .panel import IPanel | | 22 | +from .plotmanager import IPlotManager |
Collapse file Copy file name to clipboard File renamed without changes. Collapse file Copy file name to clipboardExpand all lines: plotpy/interfaces/panel.py +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -from plotpy.panels import PanelWidget | 2 | | - | 3 | | - | 4 | 1 | class IPanel: | 5 | 2 | """Interface for panels controlled by PlotManager""" | 6 | 3 |
| 7 | 4 | @staticmethod | 8 | 5 | def __inherits__(): | | 6 | + # Avoid circular import | | 7 | + # pylint: disable=import-outside-toplevel | | 8 | + from plotpy.panels import PanelWidget | | 9 | + | 9 | 10 | return PanelWidget | 10 | 11 |
| 11 | 12 | def register_panel(self, manager): | |
Collapse file Copy file name to clipboardExpand all lines: plotpy/interfaces/plotmanager.py +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -from plotpy.plot.base import BasePlot | 2 | | - | 3 | | - | 4 | 1 | class IPlotManager: | 5 | 2 | """A 'controller' that organizes relations between | 6 | 3 | plots (BasePlot), panels, tools (GuiTool) and toolbar | @@ -12,6 +9,10 @@ def add_plot(self, plot, plot_id="default"): | 12 | 9 | :param plot: | 13 | 10 | :param plot_id: | 14 | 11 | """ | | 12 | + # Avoid circular import | | 13 | + # pylint: disable=import-outside-toplevel | | 14 | + from plotpy.plot.base import BasePlot | | 15 | + | 15 | 16 | assert id not in self.plots # pylint: disable=no-member | 16 | 17 | assert isinstance(plot, BasePlot) | 17 | 18 |
| |
Collapse file Copy file name to clipboardExpand all lines: plotpy/items/annotations.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 23 | 23 |
| 24 | 24 | from plotpy.config import CONF, _ | 25 | 25 | from plotpy.coords import canvas_to_axes | 26 | | -from plotpy.interfaces.common import IBasePlotItem, ISerializableType, IShapeItemType | | 26 | +from plotpy.interfaces import IBasePlotItem, ISerializableType, IShapeItemType | 27 | 27 | from plotpy.items.label import DataInfoLabel | 28 | 28 | from plotpy.items.shapes.base import AbstractShape | 29 | 29 | from plotpy.items.shapes.ellipse import EllipseShape | | 45 | 45 | from qtpy.QtCore import QPointF, QRectF | 46 | 46 | from qtpy.QtGui import QPainter | 47 | 47 |
| 48 | | - from plotpy.interfaces.common import IItemType | | 48 | + from plotpy.interfaces import IItemType | 49 | 49 | from plotpy.styles.base import ItemParameters | 50 | 50 |
| 51 | 51 |
| |
Collapse file Copy file name to clipboardExpand all lines: plotpy/items/curve/base.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 |
| 15 | 15 | from plotpy.config import CONF, _ | 16 | 16 | from plotpy.coords import canvas_to_axes | 17 | | -from plotpy.interfaces.common import ( | | 17 | +from plotpy.interfaces import ( | 18 | 18 | IBasePlotItem, | 19 | 19 | ICurveItemType, | 20 | 20 | ISerializableType, | | 27 | 27 | import guidata.dataset.io | 28 | 28 | from qtpy import QtCore as QC | 29 | 29 |
| 30 | | - from plotpy.interfaces.common import IItemType | | 30 | + from plotpy.interfaces import IItemType | 31 | 31 | from plotpy.styles.base import ItemParameters | 32 | 32 |
| 33 | 33 |
| |
Collapse file Copy file name to clipboardExpand all lines: plotpy/items/grid.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 15 | 15 | from qwt import QwtPlot, QwtPlotGrid | 16 | 16 |
| 17 | 17 | from plotpy.config import _ | 18 | | -from plotpy.interfaces.common import IBasePlotItem, IDecoratorItemType | | 18 | +from plotpy.interfaces import IBasePlotItem, IDecoratorItemType | 19 | 19 | from plotpy.styles.base import GridParam | 20 | 20 |
| 21 | 21 | if TYPE_CHECKING: # pragma: no cover | 22 | 22 | from qtpy.QtCore import QPointF | 23 | 23 |
| 24 | | - from plotpy.interfaces.common import IItemType | | 24 | + from plotpy.interfaces import IItemType | 25 | 25 | from plotpy.styles.base import ItemParameters | 26 | 26 |
| 27 | 27 |
| |
Collapse file Copy file name to clipboardExpand all lines: plotpy/items/histogram.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 18 | 18 | from qwt import QwtPlotCurve | 19 | 19 |
| 20 | 20 | from plotpy.config import _ | 21 | | -from plotpy.interfaces.common import IBasePlotItem, IHistDataSource | | 21 | +from plotpy.interfaces import IBasePlotItem, IHistDataSource | 22 | 22 | from plotpy.items.curve.base import CurveItem | 23 | 23 | from plotpy.styles.curve import CurveParam | 24 | 24 | from plotpy.styles.histogram import HistogramParam | |
Collapse file Copy file name to clipboardExpand all lines: plotpy/items/image/base.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 26 | 26 | _scale_rect, | 27 | 27 | ) | 28 | 28 | from plotpy.config import _ | 29 | | -from plotpy.interfaces.common import ( | | 29 | +from plotpy.interfaces import ( | 30 | 30 | IBaseImageItem, | 31 | 31 | IBasePlotItem, | 32 | 32 | IColormapImageItemType, | | 51 | 51 | from qtpy.QtCore import QPointF, QRectF | 52 | 52 | from qtpy.QtGui import QColor, QPainter | 53 | 53 |
| 54 | | - from plotpy.interfaces.common import IItemType | | 54 | + from plotpy.interfaces import IItemType | 55 | 55 | from plotpy.items import RectangleShape | 56 | 56 | from plotpy.styles.base import ItemParameters | 57 | 57 |
| |
|