aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/idlelib/debugger.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-04-24 02:25:08 +0300
committerGitHub <noreply@github.com>2023-04-23 19:25:08 -0400
commitbd2dca035af88694e25fb060f984fbbcda82bed8 (patch)
treefed7d54ec1154ebc7390967d78c61e911509fae2 /Lib/idlelib/debugger.py
parent7255bbd4a1841447a21c3eb74e4fd9e21818d833 (diff)
downloadcpython-bd2dca035af88694e25fb060f984fbbcda82bed8.tar.gz
cpython-bd2dca035af88694e25fb060f984fbbcda82bed8.zip
gh-103668: Run pyugrade on idlelib (#103671)
--------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/debugger.py')
-rw-r--r--Lib/idlelib/debugger.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/debugger.py b/Lib/idlelib/debugger.py
index ccd03e46e16..452c62b4265 100644
--- a/Lib/idlelib/debugger.py
+++ b/Lib/idlelib/debugger.py
@@ -49,9 +49,9 @@ class Idb(bdb.Bdb):
filename = code.co_filename
lineno = frame.f_lineno
basename = os.path.basename(filename)
- message = "%s:%s" % (basename, lineno)
+ message = f"{basename}:{lineno}"
if code.co_name != "?":
- message = "%s: %s()" % (message, code.co_name)
+ message = f"{message}: {code.co_name}()"
return message
@@ -213,7 +213,8 @@ class Debugger:
m1 = "%s" % str(type)
if value is not None:
try:
- m1 = "%s: %s" % (m1, str(value))
+ # TODO redo entire section, tries not needed.
+ m1 = f"{m1}: {value}"
except:
pass
bg = "yellow"