From 3dddb7dea5cf898f7f05699a7f6aee8906f9ce24 Mon Sep 17 00:00:00 2001 From: umarcor Date: Mon, 23 Aug 2021 21:35:40 +0200 Subject: pyGHDL/lsp: style --- pyGHDL/lsp/lsp.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'pyGHDL/lsp') diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py index 04d2c24ce..ec35f0aca 100644 --- a/pyGHDL/lsp/lsp.py +++ b/pyGHDL/lsp/lsp.py @@ -52,9 +52,8 @@ def path_to_uri(path): # On windows, do not quote the colon after the driver letter, as # it is not quoted in uri from the client. path = path.replace("\\", "/") - return "file:///" + path[:2] + quote(path[2:]) - else: - return "file://" + quote(path) + return "file:///{0}{1}".format(path[:2], quote(path[2:])) + return "file://{0}".format(quote(path)) class LanguageProtocolServer(object): @@ -125,9 +124,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 - ), + ("Caught exception while handling {}, see VHDL language server output for details.").format(method), ) response = None if tid is None: -- cgit v1.2.3