misc: pre-commit autoupdate (#1642)

<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 →
v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0)
- [github.com/PyCQA/isort: 5.11.5 →
5.13.2](https://github.com/PyCQA/isort/compare/5.11.5...5.13.2)
- [github.com/psf/black: 23.9.1 →
24.10.0](https://github.com/psf/black/compare/23.9.1...24.10.0)
- [github.com/asottile/pyupgrade: v3.14.0 →
v3.17.0](https://github.com/asottile/pyupgrade/compare/v3.14.0...v3.17.0)
<!--pre-commit.ci end-->
This commit is contained in:
Bobby R. Bruce
2024-10-09 14:46:20 -07:00
committed by GitHub
13 changed files with 76 additions and 75 deletions

View File

@@ -111,11 +111,12 @@ class Template:
operands = SubOperandList(self.parser, compositeCode, d.operands)
myDict[
"reg_idx_arr_decl"
] = "RegId srcRegIdxArr[%d]; RegId destRegIdxArr[%d]" % (
d.operands.numSrcRegs + d.srcRegIdxPadding,
d.operands.numDestRegs + d.destRegIdxPadding,
myDict["reg_idx_arr_decl"] = (
"RegId srcRegIdxArr[%d]; RegId destRegIdxArr[%d]"
% (
d.operands.numSrcRegs + d.srcRegIdxPadding,
d.operands.numDestRegs + d.destRegIdxPadding,
)
)
# The reinterpret casts are largely because an array with a known
@@ -821,7 +822,7 @@ class ISAParser(Grammar):
"DBLCOLON",
"ASTERISK",
# C preprocessor directives
"CPPDIRECTIVE"
"CPPDIRECTIVE",
# The following are matched but never returned. commented out to
# suppress PLY warning
# newfile directive

View File

@@ -140,9 +140,9 @@ def handle_statement(parser, container, statement):
if statement.is_microop:
if statement.mnemonic not in parser.microops.keys():
raise Exception(f"Unrecognized mnemonic: {statement.mnemonic}")
parser.symbols[
"__microopClassFromInsideTheAssembler"
] = parser.microops[statement.mnemonic]
parser.symbols["__microopClassFromInsideTheAssembler"] = (
parser.microops[statement.mnemonic]
)
try:
microop = eval(
f"__microopClassFromInsideTheAssembler({statement.params})",
@@ -166,9 +166,9 @@ def handle_statement(parser, container, statement):
elif statement.is_directive:
if statement.name not in container.directives.keys():
raise Exception(f"Unrecognized directive: {statement.name}")
parser.symbols[
"__directiveFunctionFromInsideTheAssembler"
] = container.directives[statement.name]
parser.symbols["__directiveFunctionFromInsideTheAssembler"] = (
container.directives[statement.name]
)
try:
eval(
f"__directiveFunctionFromInsideTheAssembler({statement.params})",

View File

@@ -36,7 +36,6 @@ from .abstract_board import AbstractBoard
class AbstractSystemBoard(System, AbstractBoard):
"""
An abstract board for cases where boards should inherit from System.
"""

View File

@@ -44,7 +44,6 @@ from .abstract_system_board import AbstractSystemBoard
class TestBoard(AbstractSystemBoard):
"""This is a Testing Board used to run traffic generators on a simple
architecture.