diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-23 18:13:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 18:13:38 +0200 |
commit | 5ae06c44dbfa64291d83ebb2d9cd323c713315b4 (patch) | |
tree | a3273f25e220b2c69869c4c8376f31e8229dbcda /scripts/pnodespy.py | |
parent | c6283d9a9b40c3e9afeba912fcb13aa9d56b9c52 (diff) | |
parent | 6e1bbc43fc29528ceaf5d422461206e29e801744 (diff) | |
download | ghdl-5ae06c44dbfa64291d83ebb2d9cd323c713315b4.tar.gz ghdl-5ae06c44dbfa64291d83ebb2d9cd323c713315b4.tar.bz2 ghdl-5ae06c44dbfa64291d83ebb2d9cd323c713315b4.zip |
Fix more codacy issues
Diffstat (limited to 'scripts/pnodespy.py')
-rwxr-xr-x | scripts/pnodespy.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/pnodespy.py b/scripts/pnodespy.py index f443d36c5..1f016a82d 100755 --- a/scripts/pnodespy.py +++ b/scripts/pnodespy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -"""Like pnodes but output for Python""" +"""Like pnodes but output for Python.""" from __future__ import print_function @@ -65,7 +65,7 @@ def do_iirs_subprg(): @export @BindToLibGHDL("{classname}__get_kind") def Get_Kind(node: Iir) -> IirKind: - \"\"\"Get node kind\"\"\" + \"\"\"Get node kind.\"\"\" @export @BindToLibGHDL("{classname}__get_location") @@ -84,13 +84,13 @@ def do_iirs_subprg(): @export @BindToLibGHDL("{classname}__get_{kname_lower}") def Get_{kname}(obj: Iir) -> {rtype}: - \"\"\"{gettercomment}\"\"\" + \"\"\"\"\"\" @export @BindToLibGHDL("{classname}__set_{kname_lower}") def Set_{kname}(obj: Iir, value: {rtype}) -> None: - \"\"\"{settercomment}\"\"\" + \"\"\"\"\"\" """).format(kname=k.name, kname_lower=k.name.lower(), rtype=rtype, - libname=libname, classname=classname, gettercomment="", settercomment="") + libname=libname, classname=classname) ) @@ -191,7 +191,6 @@ def do_libghdl_nodes(): print(dedent("""\ from typing import TypeVar from ctypes import c_int32 - from pyGHDL.libghdl import libghdl from pyGHDL.libghdl._types import ( Iir, IirKind, @@ -334,7 +333,7 @@ def do_libghdl_names(): val_max = max(val_max, val) dict[name_def] = val res.append((name_def, val)) - print_file_header(includeBindToLibGHDL=False) + print_file_header(includeIntEnumUnique=False, includeBindToLibGHDL=False) print(dedent(""" @export @@ -350,7 +349,7 @@ def do_libghdl_names(): def do_libghdl_tokens(): - print_file_header() + print_file_header(includeBindToLibGHDL=False) read_enum("vhdl-tokens.ads", "Token_Type", "Tok_", "Tok") |