Skip to content

Commit 1ac2ef8

Browse files
committed
Adjusting print to use f strings.
1 parent ab4b987 commit 1ac2ef8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,20 @@ def read_packet(
173173
if line.startswith(prefix):
174174
# Decode length of JSON bytes
175175
if verbose:
176-
print('content: "%s"' % (line))
176+
print(f"content: {line}")
177177
length = int(line[len(prefix) :])
178178
if verbose:
179-
print('length: "%u"' % (length))
179+
print(f"length: {length}")
180180
# Skip empty line
181181
line = f.readline().decode()
182182
if verbose:
183-
print('empty: "%s"' % (line))
183+
print(f"empty: {line!r}")
184184
# Read JSON bytes
185185
json_str = f.read(length)
186186
if verbose:
187-
print('json: "%r"' % (json_str))
187+
print(f"json: {json_str!r}")
188188
if trace_file:
189-
trace_file.write("from adapter:\n%r\n" % (json_str))
189+
trace_file.write(f"from adapter:\n{json_str!r}\n")
190190
# Decode the JSON bytes into a python dictionary
191191
return json.loads(json_str)
192192

0 commit comments

Comments
 (0)