aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/libghdl
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/libghdl')
-rw-r--r--pyGHDL/libghdl/__init__.py20
-rw-r--r--pyGHDL/libghdl/_decorator.py52
-rw-r--r--pyGHDL/libghdl/_types.py6
-rw-r--r--pyGHDL/libghdl/errorout_memory.py3
-rw-r--r--pyGHDL/libghdl/files_map.py12
-rw-r--r--pyGHDL/libghdl/files_map_editor.py41
-rw-r--r--pyGHDL/libghdl/flags.py6
-rw-r--r--pyGHDL/libghdl/libraries.py21
-rw-r--r--pyGHDL/libghdl/name_table.py10
-rw-r--r--pyGHDL/libghdl/vhdl/canon.py10
-rw-r--r--pyGHDL/libghdl/vhdl/flists.py5
-rw-r--r--pyGHDL/libghdl/vhdl/formatters.py8
-rw-r--r--pyGHDL/libghdl/vhdl/ieee.py14
-rw-r--r--pyGHDL/libghdl/vhdl/lists.py12
-rw-r--r--pyGHDL/libghdl/vhdl/nodes_utils.py2
-rw-r--r--pyGHDL/libghdl/vhdl/parse.py4
-rw-r--r--pyGHDL/libghdl/vhdl/scanner.py5
-rw-r--r--pyGHDL/libghdl/vhdl/sem_lib.py2
-rw-r--r--pyGHDL/libghdl/vhdl/std_package.py20
19 files changed, 153 insertions, 100 deletions
diff --git a/pyGHDL/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py
index 1d1701aaa..1477d9361 100644
--- a/pyGHDL/libghdl/__init__.py
+++ b/pyGHDL/libghdl/__init__.py
@@ -42,10 +42,15 @@ from pydecor import export
from pyGHDL import GHDLBaseException
from pyGHDL.libghdl._types import Iir
-#from pyGHDL.libghdl._decorator import BindToLibGHDL
+
+# from pyGHDL.libghdl._decorator import BindToLibGHDL
from pyGHDL.libghdl.version import __version__
+class LibGHDLException(GHDLBaseException):
+ pass
+
+
def _get_libghdl_name() -> Path:
"""Get the name of the libghdl library (with version and extension)"""
ver = __version__.replace("-", "_").replace(".", "_")
@@ -159,7 +164,7 @@ def finalize() -> None:
@export
-#@BindToLibGHDL("options__initialize")
+# @BindToLibGHDL("options__initialize")
def initialize() -> None:
"""Initialize or re-initialize the shared library."""
libghdl.options__initialize()
@@ -179,7 +184,7 @@ def set_option(Opt: str) -> bool:
@export
-#@BindToLibGHDL("libghdl__analyze_init")
+# @BindToLibGHDL("libghdl__analyze_init")
def analyze_init() -> None:
"""
Initialize the analyzer.
@@ -191,7 +196,7 @@ def analyze_init() -> None:
@export
-#@BindToLibGHDL("libghdl__analyze_init_status")
+# @BindToLibGHDL("libghdl__analyze_init_status")
def analyze_init_status() -> int:
"""
Initialize the analyzer.
@@ -215,12 +220,7 @@ def analyze_file(fname: str) -> Iir:
@export
-#@BindToLibGHDL("ghdllocal__disp_config_prefixes")
+# @BindToLibGHDL("ghdllocal__disp_config_prefixes")
def disp_config() -> None:
"""Display the configured prefixes for libghdl."""
libghdl.ghdllocal__disp_config_prefixes()
-
-
-@export
-class LibGHDLException(GHDLBaseException):
- pass
diff --git a/pyGHDL/libghdl/_decorator.py b/pyGHDL/libghdl/_decorator.py
index 4266d31d9..e27754121 100644
--- a/pyGHDL/libghdl/_decorator.py
+++ b/pyGHDL/libghdl/_decorator.py
@@ -82,24 +82,30 @@ def BindToLibGHDL(subprogramName):
typeHintCount = len(typeHints)
if typeHintCount == 0:
- raise ValueError("Function {0} is not annotated with types.".format(func.__name__))
+ raise ValueError(
+ "Function {0} is not annotated with types.".format(func.__name__)
+ )
try:
- returnType = typeHints['return']
+ returnType = typeHints["return"]
except KeyError:
- raise ValueError("Function {0} is not annotated with a return type.".format(func.__name__))
+ raise ValueError(
+ "Function {0} is not annotated with a return type.".format(
+ func.__name__
+ )
+ )
if (typeHintCount - 1) != func.__code__.co_argcount:
- raise ValueError("Number of type annotations ({0}) for function '{1}' does not match number of parameters ({2}).".format(
- typeHintCount - 1,
- func.__name__,
- func.__code__.co_argcount)
+ raise ValueError(
+ "Number of type annotations ({0}) for function '{1}' does not match number of parameters ({2}).".format(
+ typeHintCount - 1, func.__name__, func.__code__.co_argcount
+ )
)
- # print(typeHints)
+ # print(typeHints)
parameters = typeHints.copy()
- del parameters['return']
+ del parameters["return"]
parameterTypes = []
for parameter in parameters.values():
@@ -117,9 +123,17 @@ def BindToLibGHDL(subprogramName):
if (parameter.__bound__ is int) or (parameter.__bound__ is c_int32):
parameterTypes.append(c_int32)
else:
- raise TypeError("Unsupported parameter type '{0!s}' in function '{1}'.".format(parameter, func.__name__))
+ raise TypeError(
+ "Unsupported parameter type '{0!s}' in function '{1}'.".format(
+ parameter, func.__name__
+ )
+ )
else:
- raise TypeError("Unsupported parameter type '{0!s}' in function '{1}'.".format(parameter, func.__name__))
+ raise TypeError(
+ "Unsupported parameter type '{0!s}' in function '{1}'.".format(
+ parameter, func.__name__
+ )
+ )
if returnType is None:
resultType = None
@@ -129,19 +143,27 @@ def BindToLibGHDL(subprogramName):
resultType = c_char
elif returnType is c_char_p:
resultType = c_char_p
- elif (returnType is int):
+ elif returnType is int:
resultType = c_int32
- elif (returnType is bool):
+ elif returnType is bool:
resultType = c_bool
elif isinstance(returnType, TypeVar):
if (returnType.__bound__ is int) or (returnType.__bound__ is c_int32):
resultType = c_int32
else:
- raise Exception("Unsupported return type '{0!s}' in function '{1}'.".format(returnType, func.__name__))
+ raise Exception(
+ "Unsupported return type '{0!s}' in function '{1}'.".format(
+ returnType, func.__name__
+ )
+ )
elif issubclass(returnType, Structure):
resultType = returnType
else:
- raise Exception("Unsupported return type '{0!s}' in function '{1}'.".format(returnType, func.__name__))
+ raise Exception(
+ "Unsupported return type '{0!s}' in function '{1}'.".format(
+ returnType, func.__name__
+ )
+ )
functionPointer = getattr(libghdl, subprogramName)
functionPointer.parameterTypes = parameterTypes
diff --git a/pyGHDL/libghdl/_types.py b/pyGHDL/libghdl/_types.py
index 132dbfab9..21be42c64 100644
--- a/pyGHDL/libghdl/_types.py
+++ b/pyGHDL/libghdl/_types.py
@@ -39,7 +39,7 @@ __all__ = [
"NameId",
"SourceFileEntry",
"Iir",
- "IirKind"
+ "IirKind",
]
ErrorIndex = TypeVar("ErrorIndex", bound=int)
@@ -56,4 +56,6 @@ Iir_Design_File = TypeVar("Iir_Design_File", bound=int)
Iir_Design_Unit = TypeVar("Iir_Design_Unit", bound=int)
Iir_Library_Declaration = TypeVar("Iir_Library_Declaration", bound=c_int32)
Iir_Package_Declaration = TypeVar("Iir_Package_Declaration", bound=c_int32)
-Iir_Enumeration_Type_Definition = TypeVar("Iir_Enumeration_Type_Definition", bound=c_int32)
+Iir_Enumeration_Type_Definition = TypeVar(
+ "Iir_Enumeration_Type_Definition", bound=c_int32
+)
diff --git a/pyGHDL/libghdl/errorout_memory.py b/pyGHDL/libghdl/errorout_memory.py
index 5187d5e3c..c6577540d 100644
--- a/pyGHDL/libghdl/errorout_memory.py
+++ b/pyGHDL/libghdl/errorout_memory.py
@@ -107,11 +107,12 @@ def Get_Error_Record(Idx: ErrorIndex) -> Error_Message:
"""
-#@export
+# @export
@BindToLibGHDL("errorout__memory__get_error_message_addr")
def _Get_Error_Message(Idx: ErrorIndex) -> c_char_p:
pass
+
@export
def Get_Error_Message(Idx: ErrorIndex) -> str:
"""
diff --git a/pyGHDL/libghdl/files_map.py b/pyGHDL/libghdl/files_map.py
index 7e2ae0abc..ceda483c5 100644
--- a/pyGHDL/libghdl/files_map.py
+++ b/pyGHDL/libghdl/files_map.py
@@ -87,7 +87,9 @@ def Location_File_To_Line(Location: Location_Type, File: SourceFileEntry) -> int
@export
@BindToLibGHDL("files_map__location_file_line_to_offset")
-def Location_File_Line_To_Offset(Location: Location_Type, File: SourceFileEntry, Line: int) -> int:
+def Location_File_Line_To_Offset(
+ Location: Location_Type, File: SourceFileEntry, Line: int
+) -> int:
"""
Get the offset in :obj:`Line` of :obj:`Location`.
@@ -100,7 +102,9 @@ def Location_File_Line_To_Offset(Location: Location_Type, File: SourceFileEntry,
@export
@BindToLibGHDL("files_map__location_file_line_to_col")
-def Location_File_Line_To_Col(Location: Location_Type, File: SourceFileEntry, Line: int) -> int:
+def Location_File_Line_To_Col(
+ Location: Location_Type, File: SourceFileEntry, Line: int
+) -> int:
"""
Get logical column (with HT expanded) from :obj:`Location`, :obj:`File` and
:obj:`Line`.
@@ -219,7 +223,9 @@ def Read_Source_File(Directory: NameId, Name: NameId) -> SourceFileEntry:
@export
@BindToLibGHDL("files_map__reserve_source_file")
-def Reserve_Source_File(Directory: NameId, Name: NameId, Length: int) -> SourceFileEntry:
+def Reserve_Source_File(
+ Directory: NameId, Name: NameId, Length: int
+) -> SourceFileEntry:
"""
Reserve an entry, but do not read any file.
diff --git a/pyGHDL/libghdl/files_map_editor.py b/pyGHDL/libghdl/files_map_editor.py
index 1b1f86a01..eceb3efe2 100644
--- a/pyGHDL/libghdl/files_map_editor.py
+++ b/pyGHDL/libghdl/files_map_editor.py
@@ -41,9 +41,17 @@ from pyGHDL.libghdl._decorator import BindToLibGHDL
from pyGHDL.libghdl._types import SourceFileEntry
-#@export
+# @export
@BindToLibGHDL("files_map__editor__replace_text_ptr")
-def _Replace_Text(File: SourceFileEntry, Start_Line: int, Start_Offset: int, End_Line: int, End_Offset: int, Text_Pointer: c_char_p, Text_Length: int) -> bool:
+def _Replace_Text(
+ File: SourceFileEntry,
+ Start_Line: int,
+ Start_Offset: int,
+ End_Line: int,
+ End_Offset: int,
+ Text_Pointer: c_char_p,
+ Text_Length: int,
+) -> bool:
"""Replace [START; END) by TEXT.
:param File: File where to replace a text section.
@@ -58,8 +66,15 @@ def _Replace_Text(File: SourceFileEntry, Start_Line: int, Start_Offset: int, End
@export
-def Replace_Text(File: SourceFileEntry, Start_Line: int, Start_Offset: int, End_Line: int, End_Offset: int, Text: str) -> bool:
- """ Replace [START; END) by TEXT.
+def Replace_Text(
+ File: SourceFileEntry,
+ Start_Line: int,
+ Start_Offset: int,
+ End_Line: int,
+ End_Offset: int,
+ Text: str,
+) -> bool:
+ """Replace [START; END) by TEXT.
:param File: File where to replace a text section.
:param Start_Line: undocumented
@@ -70,11 +85,19 @@ def Replace_Text(File: SourceFileEntry, Start_Line: int, Start_Offset: int, End_
:return: Return True in case of success, False in case of failure (the gap is too small).
"""
buffer = Text.encode("utf-8")
- return _Replace_Text(File, Start_Line, Start_Offset, End_Line, End_Offset, c_char_p(buffer), len(buffer))
+ return _Replace_Text(
+ File,
+ Start_Line,
+ Start_Offset,
+ End_Line,
+ End_Offset,
+ c_char_p(buffer),
+ len(buffer),
+ )
@export
-#@BindToLibGHDL("files_map__editor__fill_text_ptr")
+# @BindToLibGHDL("files_map__editor__fill_text_ptr")
def Fill_Text(File: SourceFileEntry, Text_Pointer, Text_Length: int) -> None:
"""Replace the content of :obj:`File` with TEXT.
@@ -88,8 +111,10 @@ def Fill_Text(File: SourceFileEntry, Text_Pointer, Text_Length: int) -> None:
@export
-#@BindToLibGHDL("files_map__editor__check_buffer_content")
-def Check_Buffer_Content(File: SourceFileEntry, String_Pointer, String_Length: int) -> None:
+# @BindToLibGHDL("files_map__editor__check_buffer_content")
+def Check_Buffer_Content(
+ File: SourceFileEntry, String_Pointer, String_Length: int
+) -> None:
"""
Check that content of :obj:`File` is STR[1 .. STR_LEN].
diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py
index e5f910995..fc3107e79 100644
--- a/pyGHDL/libghdl/flags.py
+++ b/pyGHDL/libghdl/flags.py
@@ -40,7 +40,7 @@ __all__ = [
"Flag_Elocations",
"Verbose",
"Flag_Elaborate_With_Outdated",
- "Flag_Force_Analysis"
+ "Flag_Force_Analysis",
]
assert sizeof(c_bool) == 1
@@ -49,6 +49,8 @@ Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations")
Verbose = c_bool.in_dll(libghdl, "flags__verbose")
-Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_with_outdated")
+Flag_Elaborate_With_Outdated = c_bool.in_dll(
+ libghdl, "flags__flag_elaborate_with_outdated"
+)
Flag_Force_Analysis = c_bool.in_dll(libghdl, "flags__flag_force_analysis")
diff --git a/pyGHDL/libghdl/libraries.py b/pyGHDL/libghdl/libraries.py
index ef3d8e98d..963f390d9 100644
--- a/pyGHDL/libghdl/libraries.py
+++ b/pyGHDL/libghdl/libraries.py
@@ -37,13 +37,16 @@ from ctypes import c_int32
from pydecor import export
from pyGHDL.libghdl import libghdl
-from pyGHDL.libghdl._types import NameId, Iir_Library_Declaration, Iir_Design_Unit, Iir_Design_File, Location_Type
+from pyGHDL.libghdl._types import (
+ NameId,
+ Iir_Library_Declaration,
+ Iir_Design_Unit,
+ Iir_Design_File,
+ Location_Type,
+)
from pyGHDL.libghdl._decorator import BindToLibGHDL
-__all__ = [
- "Library_Location",
- "Work_Library"
-]
+__all__ = ["Library_Location", "Work_Library"]
Library_Location: Location_Type = c_int32.in_dll(libghdl, "libraries__library_location")
"""
@@ -51,7 +54,9 @@ A location for library declarations (such as library WORK). Use ``.value`` to
access this variable inside libghdl.
"""
-Work_Library:Iir_Library_Declaration = c_int32.in_dll(libghdl, "libraries__work_library")
+Work_Library: Iir_Library_Declaration = c_int32.in_dll(
+ libghdl, "libraries__work_library"
+)
"""
Library declaration for the work library. Note: the identifier of the work_library
is ``work_library_name``, which may be different from 'WORK'. Use ``.value`` to
@@ -126,7 +131,9 @@ def Get_Library_No_Create(Ident: NameId) -> Iir_Library_Declaration:
@export
@BindToLibGHDL("libraries__find_primary_unit")
-def Find_Primary_Unit(Library: Iir_Library_Declaration, Name: NameId) -> Iir_Design_Unit:
+def Find_Primary_Unit(
+ Library: Iir_Library_Declaration, Name: NameId
+) -> Iir_Design_Unit:
"""
Just return the design_unit for :obj:`Name`, or ``NULL`` if not found.
diff --git a/pyGHDL/libghdl/name_table.py b/pyGHDL/libghdl/name_table.py
index ddb5ba491..408168797 100644
--- a/pyGHDL/libghdl/name_table.py
+++ b/pyGHDL/libghdl/name_table.py
@@ -39,9 +39,7 @@ from pydecor import export
from pyGHDL.libghdl._types import NameId
from pyGHDL.libghdl._decorator import BindToLibGHDL
-__all__ = [
- "Null_Identifier"
-]
+__all__ = ["Null_Identifier"]
Null_Identifier = 0
@@ -57,7 +55,7 @@ def Get_Name_Length(Id: NameId) -> int:
"""
-#@export
+# @export
@BindToLibGHDL("name_table__get_name_ptr")
def _Get_Name_Ptr(Id: NameId) -> c_char_p:
""""""
@@ -76,7 +74,7 @@ def Get_Name_Ptr(Id: NameId) -> str:
return _Get_Name_Ptr(Id).decode("utf-8")
-#@export
+# @export
@BindToLibGHDL("name_table__get_character")
def _Get_Character(Id: NameId) -> c_char:
""""""
@@ -97,7 +95,7 @@ def Get_Character(Id: NameId) -> str:
return _Get_Character(Id).decode("utf-8")
-#@export
+# @export
@BindToLibGHDL("name_table__get_identifier_with_len")
def _Get_Identifier(string: c_char_p, length: int) -> NameId:
""""""
diff --git a/pyGHDL/libghdl/vhdl/canon.py b/pyGHDL/libghdl/vhdl/canon.py
index e9bddb07c..086755c35 100644
--- a/pyGHDL/libghdl/vhdl/canon.py
+++ b/pyGHDL/libghdl/vhdl/canon.py
@@ -36,13 +36,11 @@ from ctypes import c_bool
from pyGHDL.libghdl import libghdl
-__all__ = [
- "Flag_Concurrent_Stmts",
- "Flag_Configurations",
- "Flag_Associations"
-]
+__all__ = ["Flag_Concurrent_Stmts", "Flag_Configurations", "Flag_Associations"]
-Flag_Concurrent_Stmts = c_bool.in_dll(libghdl, "vhdl__canon__canon_flag_concurrent_stmts")
+Flag_Concurrent_Stmts = c_bool.in_dll(
+ libghdl, "vhdl__canon__canon_flag_concurrent_stmts"
+)
Flag_Configurations = c_bool.in_dll(libghdl, "vhdl__canon__canon_flag_configurations")
diff --git a/pyGHDL/libghdl/vhdl/flists.py b/pyGHDL/libghdl/vhdl/flists.py
index b4217b36d..3829921f3 100644
--- a/pyGHDL/libghdl/vhdl/flists.py
+++ b/pyGHDL/libghdl/vhdl/flists.py
@@ -38,10 +38,7 @@ from pydecor import export
from pyGHDL.libghdl._decorator import BindToLibGHDL
-__all__ = [
- "Flist_Type",
- "Ffirst"
-]
+__all__ = ["Flist_Type", "Ffirst"]
Flist_Type = c_int32 #: First index of a ``FList``.
diff --git a/pyGHDL/libghdl/vhdl/formatters.py b/pyGHDL/libghdl/vhdl/formatters.py
index 42e8a6679..72b72010e 100644
--- a/pyGHDL/libghdl/vhdl/formatters.py
+++ b/pyGHDL/libghdl/vhdl/formatters.py
@@ -54,7 +54,7 @@ def Indent_String(File: int, Handle: int, FirstLine: int, LastLine: int) -> None
@export
-#@BindToLibGHDL("vhdl__formatters__allocate_handle")
+# @BindToLibGHDL("vhdl__formatters__allocate_handle")
def Allocate_Handle():
"""
.. todo:: Undocumented in Ada code.
@@ -65,7 +65,7 @@ def Allocate_Handle():
@export
-#@BindToLibGHDL("vhdl__formatters__get_length")
+# @BindToLibGHDL("vhdl__formatters__get_length")
def Get_Length(Handle) -> int:
"""
.. todo:: Undocumented in Ada code.
@@ -80,7 +80,7 @@ def Get_Length(Handle) -> int:
@export
-#@BindToLibGHDL("vhdl__formatters__get_c_string")
+# @BindToLibGHDL("vhdl__formatters__get_c_string")
def Get_C_String(Handle):
"""
.. todo:: Undocumented in Ada code.
@@ -95,7 +95,7 @@ def Get_C_String(Handle):
@export
-#@BindToLibGHDL("vhdl__formatters__free_handle")
+# @BindToLibGHDL("vhdl__formatters__free_handle")
def Free_Handle(Handle) -> None:
"""
.. todo:: Undocumented in Ada code.
diff --git a/pyGHDL/libghdl/vhdl/ieee.py b/pyGHDL/libghdl/vhdl/ieee.py
index 66396143e..652782b55 100644
--- a/pyGHDL/libghdl/vhdl/ieee.py
+++ b/pyGHDL/libghdl/vhdl/ieee.py
@@ -35,19 +35,19 @@ from ctypes import c_int
from pyGHDL.libghdl import libghdl
-__all__ = [
- "Std_Logic_1164_Pkg",
- "Std_Logic_Type",
- "Std_Logic_Vector_Type"
-]
+__all__ = ["Std_Logic_1164_Pkg", "Std_Logic_Type", "Std_Logic_Vector_Type"]
-Std_Logic_1164_Pkg = c_int.in_dll(libghdl, "vhdl__ieee__std_logic_1164__std_logic_1164_pkg")
+Std_Logic_1164_Pkg = c_int.in_dll(
+ libghdl, "vhdl__ieee__std_logic_1164__std_logic_1164_pkg"
+)
# Get value
Std_Logic_Type = c_int.in_dll(libghdl, "vhdl__ieee__std_logic_1164__std_logic_type")
# Get value
-Std_Logic_Vector_Type = c_int.in_dll(libghdl, "vhdl__ieee__std_logic_1164__std_logic_vector_type")
+Std_Logic_Vector_Type = c_int.in_dll(
+ libghdl, "vhdl__ieee__std_logic_1164__std_logic_vector_type"
+)
# Get value
# Rising_Edge = c_int.in_dll(libghdl, "vhdl__ieee__std_logic_1164__rising_edge")
diff --git a/pyGHDL/libghdl/vhdl/lists.py b/pyGHDL/libghdl/vhdl/lists.py
index 1499c4dca..d9e4fda6c 100644
--- a/pyGHDL/libghdl/vhdl/lists.py
+++ b/pyGHDL/libghdl/vhdl/lists.py
@@ -42,11 +42,7 @@ from pyGHDL.libghdl._decorator import BindToLibGHDL
@export
class Iterator(Structure):
- _fields_ = [
- ("chunk", c_int32),
- ("chunk_idx", c_int32),
- ("remain", c_int32)
- ]
+ _fields_ = [("chunk", c_int32), ("chunk_idx", c_int32), ("remain", c_int32)]
@export
@@ -71,7 +67,7 @@ def Iterate(List: int) -> Iterator:
@export
-#@BindToLibGHDL("vhdl__lists__is_valid")
+# @BindToLibGHDL("vhdl__lists__is_valid")
def Is_Valid(it: Iterator) -> bool:
"""
Check if iterator reached the end.
@@ -87,7 +83,7 @@ def Is_Valid(it: Iterator) -> bool:
@export
-#@BindToLibGHDL("vhdl__lists__next")
+# @BindToLibGHDL("vhdl__lists__next")
def Next(it: Iterator) -> bool:
"""
Move iterator to the next element.
@@ -103,7 +99,7 @@ def Next(it: Iterator) -> bool:
@export
-#@BindToLibGHDL("vhdl__lists__get_element")
+# @BindToLibGHDL("vhdl__lists__get_element")
def Get_Element(it: Iterator) -> int:
"""
Get the current element from iterator.
diff --git a/pyGHDL/libghdl/vhdl/nodes_utils.py b/pyGHDL/libghdl/vhdl/nodes_utils.py
index f2b9c8bba..7cecb6825 100644
--- a/pyGHDL/libghdl/vhdl/nodes_utils.py
+++ b/pyGHDL/libghdl/vhdl/nodes_utils.py
@@ -34,7 +34,7 @@
from pydecor import export
-from pyGHDL.libghdl._types import Iir
+from pyGHDL.libghdl._types import Iir
from pyGHDL.libghdl._decorator import BindToLibGHDL
diff --git a/pyGHDL/libghdl/vhdl/parse.py b/pyGHDL/libghdl/vhdl/parse.py
index 4f7412274..c3135961f 100644
--- a/pyGHDL/libghdl/vhdl/parse.py
+++ b/pyGHDL/libghdl/vhdl/parse.py
@@ -41,9 +41,7 @@ from pyGHDL.libghdl._types import Iir
from pyGHDL.libghdl._decorator import BindToLibGHDL
-__all__ = [
- "Flag_Parse_Parenthesis"
-]
+__all__ = ["Flag_Parse_Parenthesis"]
Flag_Parse_Parenthesis = c_bool.in_dll(libghdl, "vhdl__parse__flag_parse_parenthesis")
diff --git a/pyGHDL/libghdl/vhdl/scanner.py b/pyGHDL/libghdl/vhdl/scanner.py
index 2ed1d9b11..15d41e9a9 100644
--- a/pyGHDL/libghdl/vhdl/scanner.py
+++ b/pyGHDL/libghdl/vhdl/scanner.py
@@ -41,10 +41,7 @@ from pyGHDL.libghdl._types import SourceFileEntry, NameId
from pyGHDL.libghdl._decorator import BindToLibGHDL
-__all__ = [
- "Current_Token",
- "Flag_Comment"
-]
+__all__ = ["Current_Token", "Flag_Comment"]
# This is a c_int, so you want to use its .value
Current_Token = c_int.in_dll(libghdl, "vhdl__scanner__current_token")
diff --git a/pyGHDL/libghdl/vhdl/sem_lib.py b/pyGHDL/libghdl/vhdl/sem_lib.py
index 9702302a2..c281a299c 100644
--- a/pyGHDL/libghdl/vhdl/sem_lib.py
+++ b/pyGHDL/libghdl/vhdl/sem_lib.py
@@ -34,7 +34,7 @@
from pydecor import export
-from pyGHDL.libghdl._types import SourceFileEntry, Iir_Design_File, Iir_Design_Unit
+from pyGHDL.libghdl._types import SourceFileEntry, Iir_Design_File, Iir_Design_Unit
from pyGHDL.libghdl._decorator import BindToLibGHDL
diff --git a/pyGHDL/libghdl/vhdl/std_package.py b/pyGHDL/libghdl/vhdl/std_package.py
index 690dc78a4..600aaea83 100644
--- a/pyGHDL/libghdl/vhdl/std_package.py
+++ b/pyGHDL/libghdl/vhdl/std_package.py
@@ -35,21 +35,25 @@
from ctypes import c_int32
from pyGHDL.libghdl import libghdl
-from pyGHDL.libghdl._types import Location_Type, Iir_Package_Declaration, Iir_Enumeration_Type_Definition
+from pyGHDL.libghdl._types import (
+ Location_Type,
+ Iir_Package_Declaration,
+ Iir_Enumeration_Type_Definition,
+)
-__all__ = [
- "Std_Location",
- "Standard_Package",
- "Character_Type_Definition"
-]
+__all__ = ["Std_Location", "Standard_Package", "Character_Type_Definition"]
Std_Location: Location_Type = c_int32.in_dll(libghdl, "vhdl__std_package__std_location")
"""Virtual location for the ``std.standard`` package. Use ``.value`` to access this variable inside libghdl."""
-Standard_Package: Iir_Package_Declaration = c_int32.in_dll(libghdl, "vhdl__std_package__standard_package")
+Standard_Package: Iir_Package_Declaration = c_int32.in_dll(
+ libghdl, "vhdl__std_package__standard_package"
+)
"""Virtual package ``std.package``. Use ``.value`` to access this variable inside libghdl."""
-Character_Type_Definition: Iir_Enumeration_Type_Definition = c_int32.in_dll(libghdl, "vhdl__std_package__character_type_definition")
+Character_Type_Definition: Iir_Enumeration_Type_Definition = c_int32.in_dll(
+ libghdl, "vhdl__std_package__character_type_definition"
+)
"""Predefined character. Use ``.value`` to access this variable inside libghdl."""