From d5985406ad708323431ee819292d1dd94b38fec8 Mon Sep 17 00:00:00 2001 From: Marcell Vazquez-Chanlatte Date: Sun, 15 Oct 2017 01:11:49 -0700 Subject: [PATCH] pylint fixes --- stl/ast.py | 3 ++- stl/fastboolean_eval.py | 4 ++-- stl/hypothesis.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/stl/ast.py b/stl/ast.py index da0537e..a91f175 100644 --- a/stl/ast.py +++ b/stl/ast.py @@ -146,7 +146,8 @@ class And(NaryOpSTL): class ModalOp(namedtuple('ModalOp', ['interval', 'arg']), AST): __slots__ = () - + OP = '?' + def __repr__(self): return f"{self.OP}{self.interval}({self.arg})" diff --git a/stl/fastboolean_eval.py b/stl/fastboolean_eval.py index 500a26f..09ee957 100644 --- a/stl/fastboolean_eval.py +++ b/stl/fastboolean_eval.py @@ -79,8 +79,8 @@ def _(stl): @pointwise_satf.register(stl.AtomicPred) -def _(stl): - return lambda x, t: bitarray(x[str(stl.id)][tau] for tau in t) +def _(phi): + return lambda x, t: bitarray(x[str(phi.id)][tau] for tau in t) @pointwise_satf.register(type(stl.TOP)) def _(_): diff --git a/stl/hypothesis.py b/stl/hypothesis.py index fb653da..75b6d18 100644 --- a/stl/hypothesis.py +++ b/stl/hypothesis.py @@ -21,7 +21,7 @@ def build_lineq(params): LinEqStrategy = st.builds( - lambda x: stl.ast.Lineq(*x), + lambda x: stl.ast.LinEq(*x), st.tuples( st.lists( st.tuples( @@ -35,7 +35,7 @@ LinEqStrategy = st.builds( class SignalTemporalLogicStategy(SearchStrategy): def __init__(self, max_length: int): - super(SearchStrategy, self).__init__() + super().__init__() self.cfg_gen = ContextFreeGrammarStrategy( GRAMMAR, max_length=max_length, start='phi') self.ap_gen = st.builds(