aboutsummaryrefslogtreecommitdiffstats
path: root/examples/opengl
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-01-25 14:09:56 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-02-01 12:15:32 +0100
commite0e83b61801a66b7b221e7b7b7eebd56e0eca7d3 (patch)
tree20ba1334d590ce42a3338b9af77fa58ec6522add /examples/opengl
parentefbe25045a486697f90828c8850640a648e17fdf (diff)
examples: fix flake8 issues and add exceptions
Exception for: - qApp and tr not being directly imported: F821 - *rc and qml modules being imported but not used: F401 Pick-to: 6.5 6.2 Change-Id: I5e40f3f54c1721ef3dc5d7f1e87d5fd8ec771b8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 0555111721a2283a177864538fb437b31b148f63) Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'examples/opengl')
-rw-r--r--examples/opengl/hellogl2/mainwindow.py2
-rw-r--r--examples/opengl/hellogl2/window.py2
-rw-r--r--examples/opengl/textures/textures.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/opengl/hellogl2/mainwindow.py b/examples/opengl/hellogl2/mainwindow.py
index d19053a26..69b9b66fe 100644
--- a/examples/opengl/hellogl2/mainwindow.py
+++ b/examples/opengl/hellogl2/mainwindow.py
@@ -16,7 +16,7 @@ class MainWindow(QMainWindow):
menuWindow.addAction("Add new", QKeySequence(Qt.CTRL | Qt.Key_N),
self.onAddNew)
menuWindow.addAction("Quit", QKeySequence(Qt.CTRL | Qt.Key_Q),
- qApp.closeAllWindows)
+ qApp.closeAllWindows) # noqa: F821
self.onAddNew()
diff --git a/examples/opengl/hellogl2/window.py b/examples/opengl/hellogl2/window.py
index a12636051..ad61d2f97 100644
--- a/examples/opengl/hellogl2/window.py
+++ b/examples/opengl/hellogl2/window.py
@@ -11,7 +11,7 @@ from glwidget import GLWidget
def _main_window():
- for t in qApp.topLevelWidgets():
+ for t in qApp.topLevelWidgets(): # noqa: F821
if isinstance(t, QMainWindow):
return t
return None
diff --git a/examples/opengl/textures/textures.py b/examples/opengl/textures/textures.py
index 43edd4d58..87c1164b7 100644
--- a/examples/opengl/textures/textures.py
+++ b/examples/opengl/textures/textures.py
@@ -24,7 +24,7 @@ except ImportError:
messageBox.exec()
sys.exit(1)
-import textures_rc
+import textures_rc # noqa: F401
class GLWidget(QOpenGLWidget):
@@ -186,7 +186,7 @@ class Window(QWidget):
mainLayout.addWidget(glw, i, j)
glw.clicked.connect(self.setCurrentGlWidget)
- qApp.lastWindowClosed.connect(glw.freeGLResources)
+ qApp.lastWindowClosed.connect(glw.freeGLResources) # noqa: F821
self.currentGlWidget = self.glWidgets[0][0]