diff options
author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-05-12 17:10:35 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-05-14 13:23:50 +0200 |
commit | 3e6510ab70e488f3876c5e97458c8eaccae52ef9 (patch) | |
tree | ebc87f9db949f0e1dc348479f08a143134e54994 /examples/opengl/textures/textures.py | |
parent | fc8ef9977a88a148ac6eb91b2aafb794ee8daec8 (diff) |
examples: clean and improve code
- removing '\' from long lines,
- use f-strings instead of concatenating strings
- Use f-strings instead of the old '%' formatting
Task-number: PYSIDE-841
Change-Id: I4983c25a6272e10119d5d1a74c180828ca6f64e6
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 3c1a6f732a3a2c69e7133d07b89db0bdd788316b)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/opengl/textures/textures.py')
-rw-r--r-- | examples/opengl/textures/textures.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opengl/textures/textures.py b/examples/opengl/textures/textures.py index 521c099b3..cbefe41d6 100644 --- a/examples/opengl/textures/textures.py +++ b/examples/opengl/textures/textures.py @@ -110,7 +110,7 @@ class GLWidget(QtOpenGL.QGLWidget): if not GLWidget.sharedObject: self.textures = [] for i in range(6): - self.textures.append(self.bindTexture(QtGui.QPixmap(":/images/side%d.png" % (i + 1)))) + self.textures.append(self.bindTexture(QtGui.QPixmap(f":/images/side{i + 1}.png"))) GLWidget.sharedObject = self.makeObject() GLWidget.refCount += 1 |