diff options
author | Friedemann Kleint <[email protected]> | 2024-12-13 10:12:30 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2024-12-17 16:37:15 +0100 |
commit | 45548b18a9e73012521a7b16a234e9689da0d9ab (patch) | |
tree | 8f20adad674393e8564e4682bb5d0cc5dd444b26 /sources/pyside6/tests/QtWidgets | |
parent | dc41b6a9fb736bb0b6e86470c3d3d016fa88711a (diff) |
Fix some flake8 errors in tests/examples
As unearthed by the whitespace change.
Pick-to: 6.8
Change-Id: I58c1a38c3c4a9c91719131d7950950ddf475872b
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'sources/pyside6/tests/QtWidgets')
11 files changed, 13 insertions, 13 deletions
diff --git a/sources/pyside6/tests/QtWidgets/bug_480.py b/sources/pyside6/tests/QtWidgets/bug_480.py index 3e0d34a89..10c19c482 100644 --- a/sources/pyside6/tests/QtWidgets/bug_480.py +++ b/sources/pyside6/tests/QtWidgets/bug_480.py @@ -28,7 +28,7 @@ class BuggyWidget(QWidget): class LayoutTransferOwnerShip(unittest.TestCase): def testBug(self): - app = QApplication([]) + app = QApplication([]) # noqa: F841 w = BuggyWidget() w.setup() w.show() diff --git a/sources/pyside6/tests/QtWidgets/bug_549.py b/sources/pyside6/tests/QtWidgets/bug_549.py index ad082c451..41e23a7e9 100644 --- a/sources/pyside6/tests/QtWidgets/bug_549.py +++ b/sources/pyside6/tests/QtWidgets/bug_549.py @@ -16,7 +16,7 @@ from PySide6.QtWidgets import QApplication, QGraphicsWidget class TestBug549(unittest.TestCase): def testBug(self): - app = QApplication([]) + app = QApplication([]) # noqa: F841 w = QGraphicsWidget() w.setContentsMargins(1, 2, 3, 4) self.assertEqual(w.getContentsMargins(), (1, 2, 3, 4)) diff --git a/sources/pyside6/tests/QtWidgets/bug_575.py b/sources/pyside6/tests/QtWidgets/bug_575.py index 88d5de9ba..3b2716dda 100644 --- a/sources/pyside6/tests/QtWidgets/bug_575.py +++ b/sources/pyside6/tests/QtWidgets/bug_575.py @@ -19,7 +19,7 @@ from PySide6.QtWidgets import QApplication, QPlainTextEdit, QTextEdit class Bug575(unittest.TestCase): def testPropertyValues(self): - app = QApplication(sys.argv) + app = QApplication(sys.argv) # noqa: F841 textEdit = QPlainTextEdit() textEdit.insertPlainText("PySide INdT") selection = QTextEdit.ExtraSelection() diff --git a/sources/pyside6/tests/QtWidgets/bug_576.py b/sources/pyside6/tests/QtWidgets/bug_576.py index 81ebf4f4b..376c15ee8 100644 --- a/sources/pyside6/tests/QtWidgets/bug_576.py +++ b/sources/pyside6/tests/QtWidgets/bug_576.py @@ -27,7 +27,7 @@ class Bug576(unittest.TestCase): @unittest.skipUnless(hasattr(sys, "getrefcount"), f"{sys.implementation.name} has no refcount") def testWidgetParent(self): self._destroyed = False - app = QApplication(sys.argv) + app = QApplication(sys.argv) # noqa: F841 w = QWidget() b = QPushButton("test") diff --git a/sources/pyside6/tests/QtWidgets/bug_585.py b/sources/pyside6/tests/QtWidgets/bug_585.py index 00abf69a7..dbb64a197 100644 --- a/sources/pyside6/tests/QtWidgets/bug_585.py +++ b/sources/pyside6/tests/QtWidgets/bug_585.py @@ -19,11 +19,11 @@ from PySide6.QtWidgets import QApplication, QTreeWidget, QTreeWidgetItem class Bug585(unittest.TestCase): @unittest.skipUnless(hasattr(sys, "getrefcount"), f"{sys.implementation.name} has no refcount") def testCase(self): - app = QApplication([]) + app = QApplication([]) # noqa: F841 self._tree = QTreeWidget() self._tree.setColumnCount(2) i1 = QTreeWidgetItem(self._tree, ['1', ]) - i2 = QTreeWidgetItem(self._tree, ['2', ]) + i2 = QTreeWidgetItem(self._tree, ['2', ]) # noqa: F841 refCount = sys.getrefcount(i1) # this function return None diff --git a/sources/pyside6/tests/QtWidgets/bug_674.py b/sources/pyside6/tests/QtWidgets/bug_674.py index 1262cd150..27a00ad45 100644 --- a/sources/pyside6/tests/QtWidgets/bug_674.py +++ b/sources/pyside6/tests/QtWidgets/bug_674.py @@ -18,7 +18,7 @@ class TestBug679(unittest.TestCase): '''QGraphicsScene::clear() is missing''' @unittest.skipUnless(hasattr(sys, "getrefcount"), f"{sys.implementation.name} has no refcount") def testIt(self): - app = QApplication([]) + app = QApplication([]) # noqa: F841 scene = QGraphicsScene() hello = scene.addText("Hello") diff --git a/sources/pyside6/tests/QtWidgets/customproxywidget_test.py b/sources/pyside6/tests/QtWidgets/customproxywidget_test.py index 7a9125844..7bff22778 100644 --- a/sources/pyside6/tests/QtWidgets/customproxywidget_test.py +++ b/sources/pyside6/tests/QtWidgets/customproxywidget_test.py @@ -39,7 +39,7 @@ class CustomProxyWidgetTest(UsesQApplication): view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate) view.show() - timer = QTimer.singleShot(100, self.app.quit) + QTimer.singleShot(100, self.app.quit) self.app.exec() diff --git a/sources/pyside6/tests/QtWidgets/keep_reference_test.py b/sources/pyside6/tests/QtWidgets/keep_reference_test.py index 11f71fe7e..f93770aa0 100644 --- a/sources/pyside6/tests/QtWidgets/keep_reference_test.py +++ b/sources/pyside6/tests/QtWidgets/keep_reference_test.py @@ -84,7 +84,7 @@ class KeepReferenceTest(UsesQApplication): view.setModel(model) view = QTableView() createModelAndSetToView(view) - model = view.model() + model = view.model() # noqa: F841 if __name__ == '__main__': diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py index 1cf43db73..92dfa871e 100644 --- a/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py +++ b/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py @@ -34,7 +34,7 @@ class QGraphicsProxyWidgetTest(UsesQApplication): view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate) view.show() - timer = QTimer.singleShot(100, self.app.quit) + QTimer.singleShot(100, self.app.quit) self.app.exec() diff --git a/sources/pyside6/tests/QtWidgets/qmainwindow_test.py b/sources/pyside6/tests/QtWidgets/qmainwindow_test.py index a4ca87758..7d73aca57 100644 --- a/sources/pyside6/tests/QtWidgets/qmainwindow_test.py +++ b/sources/pyside6/tests/QtWidgets/qmainwindow_test.py @@ -56,7 +56,7 @@ class TestMainWindow(UsesQApplication): self.assertEqual(sys.getrefcount(c), 2) w.setCentralWidget(c) self.assertEqual(sys.getrefcount(c), 3) - wr = weakref.ref(c, self.objDel) + wr = weakref.ref(c, self.objDel) # noqa: F841 w.setCentralWidget(None) c = None self.app.exec() @@ -73,7 +73,7 @@ class TestMainWindow(UsesQApplication): w.setCentralWidget(c2) self.assertEqual(sys.getrefcount(c2), 3) - wr = weakref.ref(c, self.objDel) + wr = weakref.ref(c, self.objDel) # noqa: F841 w.setCentralWidget(None) c = None diff --git a/sources/pyside6/tests/QtWidgets/qpushbutton_test.py b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py index ba5e04f1d..bf62e9129 100644 --- a/sources/pyside6/tests/QtWidgets/qpushbutton_test.py +++ b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py @@ -34,7 +34,7 @@ class QPushButtonTest(UsesQApplication): w = MyWidget() w.show() - timer = QTimer.singleShot(100, self.app.quit) + QTimer.singleShot(100, self.app.quit) self.app.exec() def buttonCb(self, checked): |