Internals: Fix some lint-py warnings

This commit is contained in:
Wilson Snyder 2023-10-21 12:48:19 -04:00
parent 1075b006b5
commit eae942b91c
7 changed files with 10 additions and 10 deletions

View File

@ -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
######################################################################

View File

@ -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'

View File

@ -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")
#######################################################################

View File

@ -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")
#######################################################################

View File

@ -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):

View File

@ -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")
#######################################################################

View File

@ -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]