Skip to content

Commit c3a4218

Browse files
committed
lint: "UP031 Use format specifiers instead of percent format"
visualstudio_py_testlauncher.py:133:24: UP031 Use format specifiers instead of percent format
1 parent 9a4cd25 commit c3a4218

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_files/visualstudio_py_testlauncher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ def send_event(self, name, **args):
129129
with self.lock:
130130
body = {"type": "event", "seq": self.seq, "event": name, "body": args}
131131
self.seq += 1
132-
content = json.dumps(body).encode("utf8")
133-
headers = ("Content-Length: %d\n\n" % (len(content),)).encode("utf8")
132+
content = json.dumps(body).encode()
133+
headers = f"Content-Length: {len(content)}\n\n".encode()
134134
self.socket.send(headers)
135135
self.socket.send(content)
136136

0 commit comments

Comments
 (0)