From eae942b91c3a88fc3cdaac671522a2c645521c07 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 21 Oct 2023 12:48:19 -0400 Subject: [PATCH] Internals: Fix some lint-py warnings --- docs/bin/vl_sphinx_extract | 2 +- docs/guide/conf.py | 2 +- examples/xml_py/vl_file_copy | 4 ++-- examples/xml_py/vl_hier_graph | 4 ++-- nodist/code_coverage | 2 +- nodist/install_test | 2 +- src/astgen | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/bin/vl_sphinx_extract b/docs/bin/vl_sphinx_extract index 5c446a327..b607bd9d0 100755 --- a/docs/bin/vl_sphinx_extract +++ b/docs/bin/vl_sphinx_extract @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0201,R0903 +# pylint: disable=C0112,C0114,C0115,C0116,C0209,C0301,R0903 # -*- Python -*- See copyright, etc below ###################################################################### diff --git a/docs/guide/conf.py b/docs/guide/conf.py index d022012c2..e8d5c0234 100644 --- a/docs/guide/conf.py +++ b/docs/guide/conf.py @@ -230,4 +230,4 @@ spelling_ignore_contributor_names = True breathe_projects = {"verilated": "_build/doxygen/verilated/xml/"} breathe_default_project = "verilated" -breathe_default_members = ('members') +breathe_default_members = 'members' diff --git a/examples/xml_py/vl_file_copy b/examples/xml_py/vl_file_copy index b221eba6a..b8ac1e34c 100755 --- a/examples/xml_py/vl_file_copy +++ b/examples/xml_py/vl_file_copy @@ -60,8 +60,8 @@ class VlFileCopy: print("\t%s " % command) status = subprocess.call(command, shell=True) if status != 0: - raise Exception("Command failed running Verilator with '" + - command + "', stopped") + raise RuntimeError("Command failed running Verilator with '" + + command + "', stopped") ####################################################################### diff --git a/examples/xml_py/vl_hier_graph b/examples/xml_py/vl_hier_graph index a2e82fabd..faa79ed2d 100755 --- a/examples/xml_py/vl_hier_graph +++ b/examples/xml_py/vl_hier_graph @@ -83,8 +83,8 @@ class VlHierGraph: print("\t%s " % command) status = subprocess.call(command, shell=True) if status != 0: - raise Exception("Command failed running Verilator with '" + - command + "', stopped") + raise RuntimeError("Command failed running Verilator with '" + + command + "', stopped") ####################################################################### diff --git a/nodist/code_coverage b/nodist/code_coverage index 2fe0d13ac..5eb472bc3 100755 --- a/nodist/code_coverage +++ b/nodist/code_coverage @@ -316,7 +316,7 @@ def run(command): print("\t%s" % command) status = subprocess.call(command, shell=True) if status < 0: - raise Exception("%Error: Command failed " + command + ", stopped") + raise RuntimeError("%Error: Command failed " + command + ", stopped") def unlink_ok(filename): diff --git a/nodist/install_test b/nodist/install_test index 423400c45..3929d825b 100755 --- a/nodist/install_test +++ b/nodist/install_test @@ -104,7 +104,7 @@ def run(command): os.system(command) status = subprocess.call(command, shell=True) if status < 0: - raise Exception("%Error: Command failed " + command + ", stopped") + raise RuntimeError("%Error: Command failed " + command + ", stopped") ####################################################################### diff --git a/src/astgen b/src/astgen index 761313ee5..0ace3f347 100755 --- a/src/astgen +++ b/src/astgen @@ -350,7 +350,7 @@ class Cpt: def _exec_syms_recurse(self, aref): for sym in aref: - if type(sym) is list: + if isinstance(sym, list): self._exec_syms_recurse(sym) elif re.search(r'^\$.*', sym): if sym not in self._exec_syms: @@ -365,7 +365,7 @@ class Cpt: first = False continue out += ", " - if type(sym) is list: + if isinstance(sym, list): out += self._exec_new_recurse(sym) elif re.match(r'^\$.*', sym): out += self._exec_syms[sym]