Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusRostSAP committed May 2, 2024
1 parent 1b60d24 commit 97ee880
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion explainer/explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def add_constraint(self, constr):
:param constr: A regular expression or Signal constrain representing the constraint.
"""
pass

# Marking remove_constraint as abstract as an example
@abstractmethod
def remove_constraint(self, idx):
Expand Down
7 changes: 6 additions & 1 deletion explainer/explainer_regex.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import math
import re
from itertools import combinations, product, chain
from explainer.explainer import Explainer, Trace, EventLog, get_sublists, levenshtein_distance
from explainer.explainer import (
Explainer,
Trace,
get_sublists,
levenshtein_distance,
)


class ExplainerRegex(Explainer):
Expand Down
3 changes: 1 addition & 2 deletions explainer/explainer_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,14 @@ def activation(self, trace, constraints=None):
if re.search(constraint, node):
return True
return False

def add_constraint(self, constr):
"""
Adds a new constraint and updates the nodes list.
:param constr: A regular expression or Signal constrain representing the constraint.
"""
self.constraints.append(constr)


def conformant(self, trace, constraints=None):
if not constraints:
Expand Down

0 comments on commit 97ee880

Please sign in to comment.