Skip to content

Commit 43e6107

Browse files
committed
Fix minor pylint warnings
1 parent 417f3d7 commit 43e6107

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

plotpy/tests/tools/test_cross_section_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from guidata.qthelpers import qt_app_context
1111

1212
from plotpy.builder import make
13-
from plotpy.panels.csection.cswidget import LineCrossSection
13+
from plotpy.panels.csection.cswidget import CrossSectionWidget, LineCrossSection
1414
from plotpy.plot import PlotDialog, PlotOptions
1515
from plotpy.tests import get_path
1616
from plotpy.tools import ImageMaskTool, LCSPanelTool, LineCrossSectionTool
@@ -23,7 +23,7 @@ class BaseCSImageDialog(PlotDialog):
2323
"""
2424

2525
TOOLCLASSES = ()
26-
PANELCLASS = None
26+
PANELCLASS = CrossSectionWidget # to be overridden by subclasses
2727

2828
def __init__(self, parent=None, toolbar=True, title=None, options=None):
2929
super().__init__(

plotpy/widgets/colormap/widget.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ class EditableColormap(QwtLinearColorMap):
5959
def __init__(self, *args, name: str | None = None) -> None:
6060
super().__init__(*args)
6161
# TODO: Add this feature in a release of QwtPython
62+
# pylint: disable=no-member
6263
self.stops: list[ColorStop] = (
63-
self._QwtLinearColorMap__data.colorStops._ColorStops__stops # pylint: disable=no-member # type: ignore
64+
self._QwtLinearColorMap__data.colorStops._ColorStops__stops # type: ignore
6465
)
6566
self.name = name or "temporary"
6667

@@ -209,6 +210,7 @@ def setColorInterval(
209210
color2: last color of the interval
210211
"""
211212
super().setColorInterval(color1, color2)
213+
# pylint: disable=no-member
212214
self.stops: list[
213215
ColorStop
214216
] = self._QwtLinearColorMap__data.colorStops._ColorStops__stops # type: ignore

plotpy/widgets/selectdialog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
from qtpy.QtWidgets import QWidget # only to help intersphinx find QWidget
4848
from qwt.plot import QwtPlotItem
4949

50-
from plotpy.config import _
5150
from plotpy.items import AbstractShape, ImageItem
5251
from plotpy.panels.base import PanelWidget
5352
from plotpy.plot import BasePlot, PlotDialog, PlotOptions

0 commit comments

Comments
 (0)