aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/lsp/document.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/document.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/document.py')
-rw-r--r--pyGHDL/lsp/document.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/pyGHDL/lsp/document.py b/pyGHDL/lsp/document.py
index 00cb65955..dd7f694a1 100644
--- a/pyGHDL/lsp/document.py
+++ b/pyGHDL/lsp/document.py
@@ -124,9 +124,7 @@ class Document(object):
text_bytes = text.encode(Document.encoding, "replace")
- files_map_editor.Check_Buffer_Content(
- self._fe, ctypes.c_char_p(text_bytes), len(text_bytes)
- )
+ files_map_editor.Check_Buffer_Content(self._fe, ctypes.c_char_p(text_bytes), len(text_bytes))
@staticmethod
def add_to_library(tree):
@@ -141,10 +139,7 @@ class Document(object):
next_unit = nodes.Get_Chain(unit)
nodes.Set_Chain(unit, nodes.Null_Iir)
lib_unit = nodes.Get_Library_Unit(unit)
- if (
- lib_unit != nodes.Null_Iir
- and nodes.Get_Identifier(unit) != name_table.Null_Identifier
- ):
+ if lib_unit != nodes.Null_Iir and nodes.Get_Identifier(unit) != name_table.Null_Identifier:
# Put the unit (only if it has a library unit) in the library.
libraries.Add_Design_Unit_Into_Library(unit, False)
tree = nodes.Get_Design_File(unit)
@@ -194,9 +189,7 @@ class Document(object):
log.debug("document_symbols")
if self._tree == nodes.Null_Iir:
return []
- syms = symbols.get_symbols_chain(
- self._fe, nodes.Get_First_Design_Unit(self._tree)
- )
+ syms = symbols.get_symbols_chain(self._fe, nodes.Get_First_Design_Unit(self._tree))
return self.flatten_symbols(syms, None)
def position_to_location(self, position):