From 5d88488592f55aa8d81b3256a4e76cfdf1a7f050 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Mon, 18 Jun 2018 13:15:27 +0200 Subject: Remove semicolon from examples Task-number: PYSIDE-712 Change-Id: Ib91e4fec88bdb7146e54c285c7f4da60deecb6cf Reviewed-by: Alexandru Croitor --- examples/widgets/animation/easing/easing.py | 2 +- examples/widgets/graphicsview/collidingmice/collidingmice.py | 4 ++-- examples/widgets/graphicsview/elasticnodes.py | 2 +- examples/widgets/layouts/dynamiclayouts.py | 12 ++++++------ examples/widgets/mainwindows/application/application.py | 4 ++-- examples/widgets/richtext/syntaxhighlighter.py | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) (limited to 'examples/widgets') diff --git a/examples/widgets/animation/easing/easing.py b/examples/widgets/animation/easing/easing.py index 6a37d46d8..8bb742542 100644 --- a/examples/widgets/animation/easing/easing.py +++ b/examples/widgets/animation/easing/easing.py @@ -173,7 +173,7 @@ class Window(QtWidgets.QWidget): painter.drawLine(0, xAxis, self.m_iconSize.width(), xAxis) painter.drawLine(yAxis, 0, yAxis, self.m_iconSize.height()) - curveScale = self.m_iconSize.height() / 2.0; + curveScale = self.m_iconSize.height() / 2.0 painter.setPen(QtCore.Qt.NoPen) diff --git a/examples/widgets/graphicsview/collidingmice/collidingmice.py b/examples/widgets/graphicsview/collidingmice/collidingmice.py index 575ecc1f1..8bff64bc3 100644 --- a/examples/widgets/graphicsview/collidingmice/collidingmice.py +++ b/examples/widgets/graphicsview/collidingmice/collidingmice.py @@ -90,7 +90,7 @@ class Mouse(QtWidgets.QGraphicsItem): def shape(self): path = QtGui.QPainterPath() path.addRect(-10, -20, 20, 40) - return path; + return path def paint(self, painter, option, widget): # Body. @@ -133,7 +133,7 @@ class Mouse(QtWidgets.QGraphicsItem): if lineToCenter.length() > 150: angleToCenter = math.acos(lineToCenter.dx() / lineToCenter.length()) if lineToCenter.dy() < 0: - angleToCenter = Mouse.TwoPi - angleToCenter; + angleToCenter = Mouse.TwoPi - angleToCenter angleToCenter = Mouse.normalizeAngle((Mouse.Pi - angleToCenter) + Mouse.Pi / 2) if angleToCenter < Mouse.Pi and angleToCenter > Mouse.Pi / 4: diff --git a/examples/widgets/graphicsview/elasticnodes.py b/examples/widgets/graphicsview/elasticnodes.py index f013156d7..f640ab60c 100755 --- a/examples/widgets/graphicsview/elasticnodes.py +++ b/examples/widgets/graphicsview/elasticnodes.py @@ -131,7 +131,7 @@ class Edge(QtWidgets.QGraphicsItem): sourceArrowP1 = self.sourcePoint + QtCore.QPointF(math.sin(angle + Edge.Pi / 3) * self.arrowSize, math.cos(angle + Edge.Pi / 3) * self.arrowSize) sourceArrowP2 = self.sourcePoint + QtCore.QPointF(math.sin(angle + Edge.Pi - Edge.Pi / 3) * self.arrowSize, - math.cos(angle + Edge.Pi - Edge.Pi / 3) * self.arrowSize); + math.cos(angle + Edge.Pi - Edge.Pi / 3) * self.arrowSize) destArrowP1 = self.destPoint + QtCore.QPointF(math.sin(angle - Edge.Pi / 3) * self.arrowSize, math.cos(angle - Edge.Pi / 3) * self.arrowSize) destArrowP2 = self.destPoint + QtCore.QPointF(math.sin(angle - Edge.Pi + Edge.Pi / 3) * self.arrowSize, diff --git a/examples/widgets/layouts/dynamiclayouts.py b/examples/widgets/layouts/dynamiclayouts.py index fe46c053a..77750ee10 100644 --- a/examples/widgets/layouts/dynamiclayouts.py +++ b/examples/widgets/layouts/dynamiclayouts.py @@ -86,27 +86,27 @@ class Dialog(QDialog): def buttonsOrientationChanged(self, index): - self.mainLayout.setSizeConstraint(QLayout.SetNoConstraint); - self.setMinimumSize(0, 0); + self.mainLayout.setSizeConstraint(QLayout.SetNoConstraint) + self.setMinimumSize(0, 0) orientation = Qt.Orientation(int(self.buttonsOrientationComboBox.itemData(index))) if orientation == self.buttonBox.orientation(): return - self.mainLayout.removeWidget(self.buttonBox); + self.mainLayout.removeWidget(self.buttonBox) spacing = self.mainLayout.spacing() - oldSizeHint = self.buttonBox.sizeHint() + QSize(spacing, spacing); + oldSizeHint = self.buttonBox.sizeHint() + QSize(spacing, spacing) self.buttonBox.setOrientation(orientation) newSizeHint = self.buttonBox.sizeHint() + QSize(spacing, spacing) if orientation == Qt.Horizontal: - self.mainLayout.addWidget(self.buttonBox, 2, 0); + self.mainLayout.addWidget(self.buttonBox, 2, 0) self.resize(self.size() + QSize(-oldSizeHint.width(), newSizeHint.height())) else: - self.mainLayout.addWidget(self.buttonBox, 0, 3, 2, 1); + self.mainLayout.addWidget(self.buttonBox, 0, 3, 2, 1) self.resize(self.size() + QSize(newSizeHint.width(), -oldSizeHint.height())) self.mainLayout.setSizeConstraint(QLayout.SetDefaultConstraint) diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py index be0dc992e..78a1f9942 100755 --- a/examples/widgets/mainwindows/application/application.py +++ b/examples/widgets/mainwindows/application/application.py @@ -161,7 +161,7 @@ class MainWindow(QtWidgets.QMainWindow): self.fileMenu.addAction(self.openAct) self.fileMenu.addAction(self.saveAct) self.fileMenu.addAction(self.saveAsAct) - self.fileMenu.addSeparator(); + self.fileMenu.addSeparator() self.fileMenu.addAction(self.exitAct) self.editMenu = self.menuBar().addMenu("&Edit") @@ -243,7 +243,7 @@ class MainWindow(QtWidgets.QMainWindow): outf << self.textEdit.toPlainText() QtWidgets.QApplication.restoreOverrideCursor() - self.setCurrentFile(fileName); + self.setCurrentFile(fileName) self.statusBar().showMessage("File saved", 2000) return True diff --git a/examples/widgets/richtext/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter.py index 6a431c3f9..83621ca82 100755 --- a/examples/widgets/richtext/syntaxhighlighter.py +++ b/examples/widgets/richtext/syntaxhighlighter.py @@ -189,7 +189,7 @@ class Highlighter(QtGui.QSyntaxHighlighter): self.setFormat(startIndex, commentLength, self.multiLineCommentFormat) startIndex = self.commentStartExpression.indexIn(text, - startIndex + commentLength); + startIndex + commentLength) if __name__ == '__main__': -- cgit v1.2.3