pylint fixes

This commit is contained in:
Marcell Vazquez-Chanlatte 2017-10-15 01:11:49 -07:00
parent 8dbfc83083
commit d5985406ad
3 changed files with 6 additions and 5 deletions

View file

@ -146,6 +146,7 @@ class And(NaryOpSTL):
class ModalOp(namedtuple('ModalOp', ['interval', 'arg']), AST): class ModalOp(namedtuple('ModalOp', ['interval', 'arg']), AST):
__slots__ = () __slots__ = ()
OP = '?'
def __repr__(self): def __repr__(self):
return f"{self.OP}{self.interval}({self.arg})" return f"{self.OP}{self.interval}({self.arg})"

View file

@ -79,8 +79,8 @@ def _(stl):
@pointwise_satf.register(stl.AtomicPred) @pointwise_satf.register(stl.AtomicPred)
def _(stl): def _(phi):
return lambda x, t: bitarray(x[str(stl.id)][tau] for tau in t) return lambda x, t: bitarray(x[str(phi.id)][tau] for tau in t)
@pointwise_satf.register(type(stl.TOP)) @pointwise_satf.register(type(stl.TOP))
def _(_): def _(_):

View file

@ -21,7 +21,7 @@ def build_lineq(params):
LinEqStrategy = st.builds( LinEqStrategy = st.builds(
lambda x: stl.ast.Lineq(*x), lambda x: stl.ast.LinEq(*x),
st.tuples( st.tuples(
st.lists( st.lists(
st.tuples( st.tuples(
@ -35,7 +35,7 @@ LinEqStrategy = st.builds(
class SignalTemporalLogicStategy(SearchStrategy): class SignalTemporalLogicStategy(SearchStrategy):
def __init__(self, max_length: int): def __init__(self, max_length: int):
super(SearchStrategy, self).__init__() super().__init__()
self.cfg_gen = ContextFreeGrammarStrategy( self.cfg_gen = ContextFreeGrammarStrategy(
GRAMMAR, max_length=max_length, start='phi') GRAMMAR, max_length=max_length, start='phi')
self.ap_gen = st.builds( self.ap_gen = st.builds(