Skip to content

Commit

Permalink
switch the helper StackObj to a dataclass
Browse files Browse the repository at this point in the history
Signed-off-by: Marshall Miller <[email protected]>
  • Loading branch information
marshalljmiller committed May 6, 2024
1 parent c03186f commit b0ff6cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setools/policyrep/constraint.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ cdef class ConstraintExpression(PolicyObject):
# lower precedence.
stack = []

@dataclasses.dataclass(repr=False, eq=False, frozen=True)
class StackObj:
def __init__(self, precedence, expression):
self.precedence = precedence
self.expression = expression
precedence: int
expression: List[str]

for op in self._postfix:
if isinstance(op, frozenset) or op in _operands:
Expand Down

0 comments on commit b0ff6cd

Please sign in to comment.