From 592c734e57b00040329b49dfbe11869980dff88a Mon Sep 17 00:00:00 2001 From: Adrian Herrmann Date: Tue, 5 Dec 2023 13:00:27 +0100 Subject: Examples: Fix a number of flake8 errors (part 1) First batch, including low-hanging fruit like Alignments, whitespaces, line length, indents, etc. Pick-to: 6.6 Change-Id: I55966876077f7fddfdc82cbe376677af9995f329 Reviewed-by: Friedemann Kleint --- examples/widgets/graphicsview/elasticnodes/elasticnodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/widgets/graphicsview/elasticnodes/elasticnodes.py') diff --git a/examples/widgets/graphicsview/elasticnodes/elasticnodes.py b/examples/widgets/graphicsview/elasticnodes/elasticnodes.py index d77a35796..2e0581ff3 100644 --- a/examples/widgets/graphicsview/elasticnodes/elasticnodes.py +++ b/examples/widgets/graphicsview/elasticnodes/elasticnodes.py @@ -157,7 +157,7 @@ class Node(QGraphicsItem): line = QLineF(self.mapFromItem(item, 0, 0), QPointF(0, 0)) dx = line.dx() dy = line.dy() - l = 2.0 * (dx * dx + dy * dy) + l = 2.0 * (dx * dx + dy * dy) # noqa: E741 if l > 0: xvel += (dx * 150.0) / l yvel += (dy * 150.0) / l @@ -348,9 +348,9 @@ class GraphWidget(QGraphicsView): bottom_shadow = QRectF(scene_rect.left() + 5, scene_rect.bottom(), scene_rect.width(), 5) if right_shadow.intersects(rect) or right_shadow.contains(rect): - painter.fillRect(right_shadow, Qt.darkGray) + painter.fillRect(right_shadow, Qt.darkGray) if bottom_shadow.intersects(rect) or bottom_shadow.contains(rect): - painter.fillRect(bottom_shadow, Qt.darkGray) + painter.fillRect(bottom_shadow, Qt.darkGray) # Fill. gradient = QLinearGradient(scene_rect.topLeft(), scene_rect.bottomRight()) -- cgit v1.2.3