aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/lsp/lsp.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-08-23 22:04:28 +0200
committerGitHub <noreply@github.com>2021-08-23 22:04:28 +0200
commitc58dff10cb3d4d7f942ecd43169cd4681afe26f1 (patch)
tree4095a2b7e8f083ca22a9f4ca0424960002d34f9f /pyGHDL/lsp/lsp.py
parentdac2e4dca824f413821962eeac314ceaf56925a7 (diff)
parent3dddb7dea5cf898f7f05699a7f6aee8906f9ce24 (diff)
downloadghdl-c58dff10cb3d4d7f942ecd43169cd4681afe26f1.tar.gz
ghdl-c58dff10cb3d4d7f942ecd43169cd4681afe26f1.tar.bz2
ghdl-c58dff10cb3d4d7f942ecd43169cd4681afe26f1.zip
Set black formatting to 120 chars per line.
Added pyproject.toml
Diffstat (limited to 'pyGHDL/lsp/lsp.py')
-rw-r--r--pyGHDL/lsp/lsp.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py
index 49c5502e3..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):
@@ -122,15 +121,10 @@ class LanguageProtocolServer(object):
try:
response = fmethod(**params)
except Exception:
- log.exception(
- "Caught exception while handling %s with params %s:", method, params
- )
+ 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: