Cleanup: replace %-formatting with str.format in tools/ & release/
This commit is contained in:
@@ -59,7 +59,7 @@ def repr_f32(f):
|
||||
f_test = round(f, i)
|
||||
f_test_round = round_float_32(f_test)
|
||||
if f_test_round == f_round:
|
||||
return "%.*f" % (i, f_test)
|
||||
return "{:.{:d}f}".format(f_test, i)
|
||||
return f_str
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class PrintStructC99(gdb.Command):
|
||||
print(' ' * hs + '.' + rr_s[0] + '= ' + rr_rval)
|
||||
|
||||
|
||||
print('Running GDB from: %s\n' % (gdb.PYTHONDIR))
|
||||
print('Running GDB from: {:s}\n'.format(gdb.PYTHONDIR))
|
||||
gdb.execute("set print pretty")
|
||||
gdb.execute('set pagination off')
|
||||
gdb.execute('set print repeats 0')
|
||||
|
||||
Reference in New Issue
Block a user