aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/lsp/lsp.py
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2022-12-02 07:31:12 +0100
committerGitHub <noreply@github.com>2022-12-02 07:31:12 +0100
commit01660fb74049c5258f0e2868e0a0c5e89446de8d (patch)
treeb2c60ad75d6471b9eaff6cc8c9cc6696a2c234f6 /pyGHDL/lsp/lsp.py
parentd99076123a58f4d2a7e93706c5adecbd5b99ff8f (diff)
parent3a1784a57516346e299e57c865399d6538df9e14 (diff)
downloadghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.gz
ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.bz2
ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.zip
Merge pull request #2255 from Paebbels/paebbels/f-strings
f-strings
Diffstat (limited to 'pyGHDL/lsp/lsp.py')
-rw-r--r--pyGHDL/lsp/lsp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py
index 03b4c38e4..0b392ea84 100644
--- a/pyGHDL/lsp/lsp.py
+++ b/pyGHDL/lsp/lsp.py
@@ -139,7 +139,7 @@ class LanguageProtocolServer(object):
log.exception("Caught exception while handling %s with params %s:", method, params)
self.show_message(
MessageType.Error,
- ("Caught exception while handling {}, see VHDL language server output for details.").format(method),
+ f"Caught exception while handling {method}, see VHDL language server output for details.",
)
response = None
if tid is None:
@@ -163,14 +163,14 @@ class LanguageProtocolServer(object):
"id": tid,
"error": {
"code": JSONErrorCodes.MethodNotFound,
- "message": "unknown method {}".format(method),
+ "message": f"unknown method {method}",
},
}
return rbody
def write_output(self, body):
output = json.dumps(body, separators=(",", ":"))
- self.conn.write("Content-Length: {}\r\n".format(len(output)))
+ self.conn.write(f"Content-Length: {len(output)}\r\n")
self.conn.write("\r\n")
self.conn.write(output)