Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesouza committed Mar 25, 2024
1 parent 7830957 commit 9766756
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 14 deletions.
2 changes: 0 additions & 2 deletions osaca/db_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion osaca/parser/immediate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion osaca/parser/parser_AArch64.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 0 additions & 2 deletions osaca/parser/parser_x86att.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 4 additions & 5 deletions osaca/semantics/hw_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion osaca/semantics/kernel_dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion tests/test_db_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser_AArch64.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 9766756

Please sign in to comment.