aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon/t14.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-22 15:41:48 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-22 19:41:03 +0000
commit570cc14c50782ed46393a0a6a8d9d491fbb3785a (patch)
tree9b123ff862fb83b2c70db4791792919ecc59bd47 /examples/widgets/tutorials/cannon/t14.py
parent80aec29aca246f1f67a4f8c453b49f1eadfee6fd (diff)
Replace % formatting in examples by f-strings
As drive-by, Fix fortune server, addressbook and dombookmarks examples to work. Task-number: PYSIDE-1112 Change-Id: I8ef7759ed56aeb7157cf2222bee9b6481973112a Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples/widgets/tutorials/cannon/t14.py')
-rw-r--r--examples/widgets/tutorials/cannon/t14.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tutorials/cannon/t14.py b/examples/widgets/tutorials/cannon/t14.py
index 19fb95ac8..420eeaa08 100644
--- a/examples/widgets/tutorials/cannon/t14.py
+++ b/examples/widgets/tutorials/cannon/t14.py
@@ -96,9 +96,9 @@ class LCDRange(QtWidgets.QWidget):
def setRange(self, minValue, maxValue):
if minValue < 0 or maxValue > 99 or minValue > maxValue:
- QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ QtCore.qWarning(f"LCDRange::setRange({minValue}, {maxValue})\n"
"\tRange must be 0..99\n"
- "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ "\tand minValue must not be greater than maxValue")
return
self.slider.setRange(minValue, maxValue)