Skip to content

Commit

Permalink
Merge branch 'fix-deprecation' into when-cover
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Nov 21, 2023
2 parents a8daa1d + f93c1d0 commit d482c64
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 60 deletions.
7 changes: 6 additions & 1 deletion fault/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _codegen_slice(self, value):

def _compile(self, value):
if isinstance(value, PropertyUnaryOp):
return f"{value.op_str} {self._compile(value.arg)}"
return f"({value.op_str} ({self._compile(value.arg)}))"
# TODO: Refactor getitem properties to share code
if isinstance(value, Delay):
result = ""
Expand Down Expand Up @@ -322,6 +322,11 @@ class Not(PropertyUnaryOp):
def __init__(self, arg):
self.arg = arg

def __or__(self, other):
if isinstance(other, Property):
return other.__ror__(self)
return super().__or__(other)


def not_(arg):
return Not(arg)
2 changes: 2 additions & 0 deletions tests/test_kratos_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import hwtypes


pytest.skip("kratos_runtime archived", allow_module_level=True)

has_runtime = fault.util.has_kratos_runtime()


Expand Down
Loading

0 comments on commit d482c64

Please sign in to comment.