aboutsummaryrefslogtreecommitdiffstats
path: root/examples/charts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-28 10:39:36 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-28 12:08:29 +0200
commit1ec4d298984d90672354e7864e35af4100285525 (patch)
treebba17fc66bef715f50d042c40e37e2707b7e5c8a /examples/charts
parent29edb488705c1498f67ff7c1958b27d617136da0 (diff)
Examples: Use new form of super()
Task-number: PYSIDE-1112 Change-Id: Ifcb4da974bdcad7af536404fffdbffc585d3d167 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples/charts')
-rw-r--r--examples/charts/audio/audio.py2
-rw-r--r--examples/charts/callout/callout.py2
-rw-r--r--examples/charts/donutbreakdown/donutbreakdown.py4
-rw-r--r--examples/charts/legend/legend.py2
-rw-r--r--examples/charts/lineandbar/lineandbar.py2
-rw-r--r--examples/charts/linechart/linechart.py2
-rw-r--r--examples/charts/logvalueaxis/logvalueaxis.py2
-rw-r--r--examples/charts/memoryusage/memoryusage.py2
-rw-r--r--examples/charts/modeldata/modeldata.py4
-rw-r--r--examples/charts/nesteddonuts/nesteddonuts.py2
-rw-r--r--examples/charts/percentbarchart/percentbarchart.py2
-rw-r--r--examples/charts/piechart/piechart.py2
-rw-r--r--examples/charts/temperaturerecords/temperaturerecords.py2
13 files changed, 15 insertions, 15 deletions
diff --git a/examples/charts/audio/audio.py b/examples/charts/audio/audio.py
index 969f2b9ab..2d4c1a552 100644
--- a/examples/charts/audio/audio.py
+++ b/examples/charts/audio/audio.py
@@ -53,7 +53,7 @@ resolution = 4
class MainWindow(QMainWindow):
def __init__(self, device):
- super(MainWindow, self).__init__()
+ super().__init__()
self.series = QLineSeries()
self.chart = QChart()
diff --git a/examples/charts/callout/callout.py b/examples/charts/callout/callout.py
index 747f20072..219f44597 100644
--- a/examples/charts/callout/callout.py
+++ b/examples/charts/callout/callout.py
@@ -154,7 +154,7 @@ class Callout(QGraphicsItem):
class View(QGraphicsView):
def __init__(self, parent = None):
- super(View, self).__init__(parent)
+ super().__init__(parent)
self.setScene(QGraphicsScene(self))
self.setDragMode(QGraphicsView.NoDrag)
diff --git a/examples/charts/donutbreakdown/donutbreakdown.py b/examples/charts/donutbreakdown/donutbreakdown.py
index 320156bc9..b724857d3 100644
--- a/examples/charts/donutbreakdown/donutbreakdown.py
+++ b/examples/charts/donutbreakdown/donutbreakdown.py
@@ -49,7 +49,7 @@ from PySide6.QtCharts import QChart, QChartView, QPieSeries, QPieSlice
class MainSlice(QPieSlice):
def __init__(self, breakdown_series, parent=None):
- super(MainSlice, self).__init__(parent)
+ super().__init__(parent)
self.breakdown_series = breakdown_series
self.name = None
@@ -72,7 +72,7 @@ class MainSlice(QPieSlice):
class DonutBreakdownChart(QChart):
def __init__(self, parent=None):
- super(DonutBreakdownChart, self).__init__(QChart.ChartTypeCartesian,
+ super().__init__(QChart.ChartTypeCartesian,
parent, Qt.WindowFlags())
self.main_series = QPieSeries()
self.main_series.setPieSize(0.7)
diff --git a/examples/charts/legend/legend.py b/examples/charts/legend/legend.py
index 639e28f68..1a75d076e 100644
--- a/examples/charts/legend/legend.py
+++ b/examples/charts/legend/legend.py
@@ -49,7 +49,7 @@ from PySide6.QtCharts import QBarSeries, QBarSet, QChart, QChartView
class MainWidget(QWidget):
def __init__(self, parent=None):
- super(MainWidget, self).__init__(parent)
+ super().__init__(parent)
self.chart = QChart()
self.series = QBarSeries()
diff --git a/examples/charts/lineandbar/lineandbar.py b/examples/charts/lineandbar/lineandbar.py
index a3601c162..606e66415 100644
--- a/examples/charts/lineandbar/lineandbar.py
+++ b/examples/charts/lineandbar/lineandbar.py
@@ -51,7 +51,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSeries, QBarSet, QChart,
class TestChart(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.set0 = QBarSet("Jane")
self.set1 = QBarSet("John")
diff --git a/examples/charts/linechart/linechart.py b/examples/charts/linechart/linechart.py
index ce81c36d8..0b46ff84d 100644
--- a/examples/charts/linechart/linechart.py
+++ b/examples/charts/linechart/linechart.py
@@ -49,7 +49,7 @@ from PySide6.QtCharts import QChart, QChartView, QLineSeries
class TestChart(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.series = QLineSeries()
self.series.append(0, 6)
diff --git a/examples/charts/logvalueaxis/logvalueaxis.py b/examples/charts/logvalueaxis/logvalueaxis.py
index 180940b73..3dbad1299 100644
--- a/examples/charts/logvalueaxis/logvalueaxis.py
+++ b/examples/charts/logvalueaxis/logvalueaxis.py
@@ -52,7 +52,7 @@ from PySide6.QtCharts import (QChart, QChartView, QLineSeries, QLogValueAxis,
class TestChart(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.series = QLineSeries()
self.series.append([
diff --git a/examples/charts/memoryusage/memoryusage.py b/examples/charts/memoryusage/memoryusage.py
index aac03b00f..0a098014c 100644
--- a/examples/charts/memoryusage/memoryusage.py
+++ b/examples/charts/memoryusage/memoryusage.py
@@ -97,7 +97,7 @@ def get_memory_usage():
class MainWindow(QMainWindow):
def __init__(self):
- super(MainWindow, self).__init__()
+ super().__init__()
self.setWindowTitle('Memory Usage')
diff --git a/examples/charts/modeldata/modeldata.py b/examples/charts/modeldata/modeldata.py
index 380f538f1..0fd38d0f5 100644
--- a/examples/charts/modeldata/modeldata.py
+++ b/examples/charts/modeldata/modeldata.py
@@ -53,7 +53,7 @@ from PySide6.QtCharts import QChart, QChartView, QLineSeries, QVXYModelMapper
class CustomTableModel(QAbstractTableModel):
def __init__(self):
- QAbstractTableModel.__init__(self)
+ super().__init__()
self.input_data = []
self.mapping = {}
self.column_count = 4
@@ -119,7 +119,7 @@ class CustomTableModel(QAbstractTableModel):
class TableWidget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.model = CustomTableModel()
diff --git a/examples/charts/nesteddonuts/nesteddonuts.py b/examples/charts/nesteddonuts/nesteddonuts.py
index 9005980a2..d8ee6160c 100644
--- a/examples/charts/nesteddonuts/nesteddonuts.py
+++ b/examples/charts/nesteddonuts/nesteddonuts.py
@@ -54,7 +54,7 @@ from functools import partial
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.setMinimumSize(800, 600)
self.donuts = []
self.chart_view = QChartView()
diff --git a/examples/charts/percentbarchart/percentbarchart.py b/examples/charts/percentbarchart/percentbarchart.py
index b9301f36e..6557fe81a 100644
--- a/examples/charts/percentbarchart/percentbarchart.py
+++ b/examples/charts/percentbarchart/percentbarchart.py
@@ -50,7 +50,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSet, QChart, QChartView,
class MainWindow(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
set0 = QBarSet("Jane")
set1 = QBarSet("John")
diff --git a/examples/charts/piechart/piechart.py b/examples/charts/piechart/piechart.py
index ebb602b0c..1980c0ba1 100644
--- a/examples/charts/piechart/piechart.py
+++ b/examples/charts/piechart/piechart.py
@@ -50,7 +50,7 @@ from PySide6.QtCharts import QChart, QChartView, QPieSeries
class TestChart(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.series = QPieSeries()
diff --git a/examples/charts/temperaturerecords/temperaturerecords.py b/examples/charts/temperaturerecords/temperaturerecords.py
index b37b70db2..d3bc872af 100644
--- a/examples/charts/temperaturerecords/temperaturerecords.py
+++ b/examples/charts/temperaturerecords/temperaturerecords.py
@@ -50,7 +50,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSet, QChart, QChartView,
class MainWindow(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
low = QBarSet("Min")
high = QBarSet("Max")
low.append([-52, -50, -45.3, -37.0, -25.6, -8.0,