From b7e560a7eadcf989062745b366976da3411f6605 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 19 Feb 2021 11:33:06 -0800 Subject: [PATCH] fix imports * metaarray is not used * PlotCurveItem and ScatterPlotItem needed to be imported * sort --- pyqtgraph/graphicsItems/PlotItem/PlotItem.py | 35 +++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py index 318351f4..a2affcf7 100644 --- a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py +++ b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py @@ -1,38 +1,33 @@ # -*- coding: utf-8 -*- -import sys +import importlib +import os import warnings import weakref + import numpy as np -import os -from ...Qt import QtGui, QtCore, QT_LIB -from ... import icons + +from ..AxisItem import AxisItem +from ..ButtonItem import ButtonItem +from ..GraphicsWidget import GraphicsWidget +from ..InfiniteLine import InfiniteLine +from ..LabelItem import LabelItem +from ..LegendItem import LegendItem +from ..PlotDataItem import PlotDataItem +from ..ViewBox import ViewBox from ... import functions as fn -from ...widgets.FileDialog import FileDialog -from .. PlotDataItem import PlotDataItem -from .. ViewBox import ViewBox -from .. AxisItem import AxisItem -from .. LabelItem import LabelItem -from .. LegendItem import LegendItem -from .. GraphicsWidget import GraphicsWidget -from .. ButtonItem import ButtonItem -from .. InfiniteLine import InfiniteLine +from ... import icons, PlotCurveItem, ScatterPlotItem +from ...Qt import QtGui, QtCore, QT_LIB from ...WidgetGroup import WidgetGroup from ...python2_3 import basestring +from ...widgets.FileDialog import FileDialog translate = QtCore.QCoreApplication.translate -import importlib ui_template = importlib.import_module( f'.plotConfigTemplate_{QT_LIB.lower()}', package=__package__) __all__ = ['PlotItem'] -try: - from metaarray import * - HAVE_METAARRAY = True -except: - HAVE_METAARRAY = False - class PlotItem(GraphicsWidget): """GraphicsWidget implementing a standard 2D plotting area with axes.