diff options
author | umarcor <unai.martinezcorral@ehu.eus> | 2021-06-22 12:26:43 +0200 |
---|---|---|
committer | umarcor <unai.martinezcorral@ehu.eus> | 2021-06-22 18:51:02 +0200 |
commit | 51e9764f04da876993a80f6f09910e019eb84446 (patch) | |
tree | e58928ecfbafb74bf33e8873423e7ed5874422c2 /pyGHDL/lsp | |
parent | 25a3580831170f8a0acd0a79aca2c94ea4652338 (diff) | |
download | ghdl-51e9764f04da876993a80f6f09910e019eb84446.tar.gz ghdl-51e9764f04da876993a80f6f09910e019eb84446.tar.bz2 ghdl-51e9764f04da876993a80f6f09910e019eb84446.zip |
fix issues reported by Codacy
Diffstat (limited to 'pyGHDL/lsp')
-rw-r--r-- | pyGHDL/lsp/lsp.py | 2 | ||||
-rw-r--r-- | pyGHDL/lsp/workspace.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py index a2598f186..43b8c47c8 100644 --- a/pyGHDL/lsp/lsp.py +++ b/pyGHDL/lsp/lsp.py @@ -117,7 +117,7 @@ class LanguageProtocolServer(object): params = {} try: response = fmethod(**params) - except Exception as e: + except Exception: log.exception( "Caught exception while handling %s with params %s:", method, params ) diff --git a/pyGHDL/lsp/workspace.py b/pyGHDL/lsp/workspace.py index bef20a872..cb392be9b 100644 --- a/pyGHDL/lsp/workspace.py +++ b/pyGHDL/lsp/workspace.py @@ -4,7 +4,7 @@ import json from ctypes import byref import pyGHDL.libghdl as libghdl import pyGHDL.libghdl.errorout_memory as errorout_memory -import pyGHDL.libghdl.flags +import pyGHDL.libghdl.flags as flags import pyGHDL.libghdl.errorout as errorout import pyGHDL.libghdl.files_map as files_map import pyGHDL.libghdl.libraries as libraries @@ -12,7 +12,7 @@ import pyGHDL.libghdl.name_table as name_table import pyGHDL.libghdl.vhdl.nodes as nodes import pyGHDL.libghdl.vhdl.lists as lists import pyGHDL.libghdl.vhdl.std_package as std_package -import pyGHDL.libghdl.vhdl.parse +import pyGHDL.libghdl.vhdl.parse as parse import pyGHDL.libghdl.vhdl.sem_lib as sem_lib import pyGHDL.libghdl.utils as pyutils @@ -44,15 +44,15 @@ class Workspace(object): self._prj = {} self._last_linted_doc = None errorout_memory.Install_Handler() - libghdl.flags.Flag_Elocations.value = True - # libghdl.Flags.Verbose.value = True + flags.Flag_Elocations.value = True + # flags.Verbose.value = True # We do analysis even in case of errors. - libghdl.vhdl.parse.Flag_Parse_Parenthesis.value = True + parse.Flag_Parse_Parenthesis.value = True # Force analysis to get more feedback + navigation even in case # of errors. - libghdl.flags.Flag_Force_Analysis.value = True + flags.Flag_Force_Analysis.value = True # Do not consider analysis order issues. - libghdl.flags.Flag_Elaborate_With_Outdated.value = True + flags.Flag_Elaborate_With_Outdated.value = True libghdl.errorout.Enable_Warning(errorout.Msgid.Warnid_Unused, True) self.read_project() self.set_options_from_project() |