diff --git a/osaca/db_interface.py b/osaca/db_interface.py index 8c32dd7..85e53dd 100644 --- a/osaca/db_interface.py +++ b/osaca/db_interface.py @@ -10,9 +10,7 @@ import ruamel.yaml from osaca.semantics import MachineModel -from osaca.parser.memory import MemoryOperand from osaca.parser.register import RegisterOperand -from osaca.parser.immediate import ImmediateOperand from osaca.parser.instruction_form import InstructionForm diff --git a/osaca/parser/immediate.py b/osaca/parser/immediate.py index 742819c..45a1972 100644 --- a/osaca/parser/immediate.py +++ b/osaca/parser/immediate.py @@ -36,7 +36,7 @@ def shift(self): return self._imd_type @imd_type.setter - def imd_type(self, type): + def imd_type(self, imd_type): self._imd_type = imd_type @identifier.setter diff --git a/osaca/parser/parser_AArch64.py b/osaca/parser/parser_AArch64.py index e858732..62ec851 100644 --- a/osaca/parser/parser_AArch64.py +++ b/osaca/parser/parser_AArch64.py @@ -12,7 +12,6 @@ from osaca.parser.identifier import IdentifierOperand from osaca.parser.immediate import ImmediateOperand from osaca.parser.condition import ConditionOperand -from osaca.parser.flag import FlagOperand from osaca.parser.prefetch import PrefetchOperand diff --git a/osaca/parser/parser_x86att.py b/osaca/parser/parser_x86att.py index b02d5bf..c6d67b8 100644 --- a/osaca/parser/parser_x86att.py +++ b/osaca/parser/parser_x86att.py @@ -7,14 +7,12 @@ from osaca.parser import BaseParser from osaca.parser.instruction_form import InstructionForm -from osaca.parser.operand import Operand from osaca.parser.directive import DirectiveOperand from osaca.parser.memory import MemoryOperand from osaca.parser.label import LabelOperand from osaca.parser.register import RegisterOperand from osaca.parser.identifier import IdentifierOperand from osaca.parser.immediate import ImmediateOperand -from osaca.parser.flag import FlagOperand class ParserX86ATT(BaseParser): diff --git a/osaca/semantics/hw_model.py b/osaca/semantics/hw_model.py index c3e19a1..e05dd5f 100644 --- a/osaca/semantics/hw_model.py +++ b/osaca/semantics/hw_model.py @@ -11,7 +11,6 @@ import ruamel.yaml from osaca import __version__, utils -from copy import deepcopy from osaca.parser import ParserX86ATT from osaca.parser.instruction_form import InstructionForm from osaca.parser.operand import Operand @@ -261,10 +260,10 @@ def operand_to_class(self, o, new_operands): elif o["class"] == "prfop": new_operands.append( PrefetchOperand( - type_id=o["type"] if "type" in o else None, - target=o["target"] if "target" in o else None, - policy=o["policy"] if "policy" in o else None, - ) + type_id=o["type"] if "type" in o else None, + target=o["target"] if "target" in o else None, + policy=o["policy"] if "policy" in o else None, + ) ) else: new_operands.append(o) diff --git a/osaca/semantics/kernel_dg.py b/osaca/semantics/kernel_dg.py index a061749..c9d64a5 100644 --- a/osaca/semantics/kernel_dg.py +++ b/osaca/semantics/kernel_dg.py @@ -12,7 +12,6 @@ from osaca.parser.memory import MemoryOperand from osaca.parser.register import RegisterOperand from osaca.parser.immediate import ImmediateOperand -from osaca.parser.operand import Operand from osaca.parser.flag import FlagOperand diff --git a/tests/test_db_interface.py b/tests/test_db_interface.py index c5879e1..f26ffa2 100755 --- a/tests/test_db_interface.py +++ b/tests/test_db_interface.py @@ -7,7 +7,7 @@ from io import StringIO import osaca.db_interface as dbi -from osaca.db_interface import sanity_check, _get_full_instruction_name +from osaca.db_interface import sanity_check from osaca.semantics import MachineModel from osaca.parser import InstructionForm from osaca.parser.memory import MemoryOperand diff --git a/tests/test_parser_AArch64.py b/tests/test_parser_AArch64.py index aebe58d..c895c99 100755 --- a/tests/test_parser_AArch64.py +++ b/tests/test_parser_AArch64.py @@ -234,7 +234,7 @@ def test_parse_line(self): instruction_form_5 = InstructionForm( mnemonic="prfm", operands=[ - PrefetchOperand(type_id=["PLD"],target=["L1"],policy=["KEEP"]), + PrefetchOperand(type_id=["PLD"], target=["L1"], policy=["KEEP"]), MemoryOperand( offset=ImmediateOperand(value=2048), base=RegisterOperand(prefix="x", name="26"),