Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Dec 13, 2024
1 parent 3e59e80 commit f1775fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
11 changes: 9 additions & 2 deletions seal5/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def __init__(self, name: str, size: int, width: int, signed: bool, reg_class: Se
# TODO: attributes

def __repr__(self):
return f"{type(self)}({self.name}, size={self.size}, width={self.width}, signed={self.signed}, reg_class={self.reg_class})"
return (
f"{type(self)}({self.name}, size={self.size}, "
f"width={self.width}, signed={self.signed}, "
f"reg_class={self.reg_class})"
)


class Seal5RegisterGroup:
Expand All @@ -101,7 +105,10 @@ def __init__(self, names: List[str], size: int, width: int, signed: bool, reg_cl
self.reg_class = reg_class

def __repr__(self):
return f"{type(self)}({self.names}, size={self.size}, width={self.width}, signed={self.signed}, reg_class={self.reg_class})"
return (
f"{type(self)}({self.names}, size={self.size}, width={self.width}, "
f"signed={self.signed}, reg_class={self.reg_class})"
)

@property
def registers(self):
Expand Down
4 changes: 2 additions & 2 deletions seal5/transform/check_pattern_support/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import pandas as pd

from m2isar.metamodel import arch, behav
import seal5.model
from seal5.model import Seal5InstrAttribute, Seal5OperandAttribute


Expand Down Expand Up @@ -138,7 +137,8 @@ def check_noop(operation):
)
if skip_pattern_gen:
attributes[Seal5InstrAttribute.SKIP_PATTERN_GEN] = []
# TODO: move to different/new pass (add_instr_attributes) and move detections to Seal5Instr class in metamodel
# TODO: move to different/new pass (add_instr_attributes) and
# move detections to Seal5Instr class in metamodel
attributes[Seal5InstrAttribute.LLVM_INSTR] = behav.StringLiteral(instr_def.name)
instr_def.attributes = attributes
metrics["n_success"] += 1
Expand Down
5 changes: 0 additions & 5 deletions seal5/transform/detect_inouts/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ def scalar_definition(self: behav.ScalarDefinition, context):
return self


def break_(self: behav.Break, context):
# print("break_")
return self


def assignment(self: behav.Assignment, context):
# print("assignment")
context.is_write = True
Expand Down

0 comments on commit f1775fd

Please sign in to comment.