Skip to content

Commit 902087e

Browse files
committed
Python 3 compatibility: ran 2to3 with default options
1 parent d85e3b9 commit 902087e

17 files changed

+25
-25
lines changed

qwt/color_map.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def rgb(self, mode, pos):
113113
class QwtColorMap(object):
114114

115115
# enum Format
116-
RGB, Indexed = range(2)
116+
RGB, Indexed = list(range(2))
117117

118118
def __init__(self, format_=None):
119119
if format_ is None:
@@ -148,7 +148,7 @@ def __init__(self):
148148
class QwtLinearColorMap(QwtColorMap):
149149

150150
# enum Mode
151-
FixedColors, ScaledColors = range(2)
151+
FixedColors, ScaledColors = list(range(2))
152152

153153
def __init__(self, *args):
154154
color1, color2 = QColor(Qt.blue), QColor(Qt.yellow)

qwt/column_symbol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class QwtColumnSymbol(object):
8686
UserStyle = 1000
8787

8888
# enum FrameStyle
89-
NoFrame, Plain, Raised = range(3)
89+
NoFrame, Plain, Raised = list(range(3))
9090

9191
def __init__(self, style):
9292
self.__data = QwtColumnSymbol_PrivateData()
@@ -140,7 +140,7 @@ def drawBox(self, painter, rect):
140140
class QwtColumnRect(object):
141141

142142
# enum Direction
143-
LeftToRight, RightToLeft, BottomToTop, TopToBottom = range(4)
143+
LeftToRight, RightToLeft, BottomToTop, TopToBottom = list(range(4))
144144

145145
def __init__(self):
146146
self.hInterval = QwtInterval()

qwt/curve_fitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self):
2626

2727
class QwtSplineCurveFitter(QwtCurveFitter):
2828
# enum FitMode
29-
Auto, Spline, ParametricSpline = range(3)
29+
Auto, Spline, ParametricSpline = list(range(3))
3030

3131
def __init__(self):
3232
super(QwtSplineCurveFitter, self).__init__()

qwt/legend_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
class QwtLegendData(object):
1111

1212
# enum Mode
13-
ReadOnly, Clickable, Checkable = range(3)
13+
ReadOnly, Clickable, Checkable = list(range(3))
1414

1515
# enum Role
16-
ModeRole, TitleRole, IconRole = range(3)
16+
ModeRole, TitleRole, IconRole = list(range(3))
1717
UserRole = 32
1818

1919
def __init__(self):

qwt/null_paintdevice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def nullDevice(self):
157157
class QwtNullPaintDevice(QPaintDevice):
158158

159159
# enum Mode
160-
NormalMode, PolygonPathMode, PathMode = range(3)
160+
NormalMode, PolygonPathMode, PathMode = list(range(3))
161161

162162
def __init__(self):
163163
super(QwtNullPaintDevice, self).__init__()

qwt/painter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def drawFocusRect(self, *args):
379379
"(s) (%s given)" % len(args))
380380

381381
def drawRoundFrame(self, painter, rect, palette, lineWidth, frameStyle):
382-
Plain, Sunken, Raised = range(3)
382+
Plain, Sunken, Raised = list(range(3))
383383
style = Plain
384384
if (frameStyle & QFrame.Sunken) == QFrame.Sunken:
385385
style = Sunken
@@ -511,7 +511,7 @@ def drawRoundedFrame(self, painter, rect, xRadius, yRadius,
511511
r = rect.adjusted(lw2, lw2, -lw2, -lw2)
512512
path = QPainterPath()
513513
path.addRoundedRect(r, xRadius, yRadius)
514-
Plain, Sunken, Raised = range(3)
514+
Plain, Sunken, Raised = list(range(3))
515515
style = Plain
516516
if (frameStyle & QFrame.Sunken) == QFrame.Sunken:
517517
style = Sunken

qwt/painter_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class QwtPainterCommand(object):
4343

4444
# enum Type
4545
Invalid = -1
46-
Path, Pixmap, Image, State = range(4)
46+
Path, Pixmap, Image, State = list(range(4))
4747

4848
def __init__(self, *args):
4949
if len(args) == 0:

qwt/plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ class QwtPlot(QFrame, QwtPlotDict):
131131
SIG_LEGEND_DATA_CHANGED = Signal("PyQt_PyObject", "PyQt_PyObject")
132132

133133
# enum Axis
134-
yLeft, yRight, xBottom, xTop, axisCnt = range(5)
134+
yLeft, yRight, xBottom, xTop, axisCnt = list(range(5))
135135

136136
# enum LegendPosition
137-
LeftLegend, RightLegend, BottomLegend, TopLegend = range(4)
137+
LeftLegend, RightLegend, BottomLegend, TopLegend = list(range(4))
138138

139139
def __init__(self, *args):
140140
if len(args) == 0:
@@ -867,7 +867,7 @@ class QwtPlotItem(object):
867867
Rtti_PlotIntervalCurve, Rtti_PlotHistogram, Rtti_PlotSpectrogram,
868868
Rtti_PlotSVG, Rtti_PlotTradingCurve, Rtti_PlotBarChart,
869869
Rtti_PlotMultiBarChart, Rtti_PlotShape, Rtti_PlotTextLabel,
870-
Rtti_PlotZone) = range(17)
870+
Rtti_PlotZone) = list(range(17))
871871
Rtti_PlotUserItem = 1000
872872

873873
# enum ItemAttribute

qwt/plot_canvas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class QwtPlotCanvas(QFrame):
314314
ImmediatePaint = 8
315315

316316
# enum FocusIndicator
317-
NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator = range(3)
317+
NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator = list(range(3))
318318

319319
def __init__(self, plot=None):
320320
super(QwtPlotCanvas, self).__init__(plot)

qwt/plot_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class QwtPlotCurve(QwtPlotSeriesItem, QwtSeriesStore):
6868

6969
# enum CurveStyle
7070
NoCurve = -1
71-
Lines, Sticks, Steps, Dots = range(4)
71+
Lines, Sticks, Steps, Dots = list(range(4))
7272
UserCurve = 100
7373

7474
# enum CurveAttribute

0 commit comments

Comments
 (0)