yapf + pylint + add style checks to tests
This commit is contained in:
parent
d52fffe826
commit
a1ca4c6579
18 changed files with 130 additions and 299 deletions
|
|
@ -5,15 +5,11 @@
|
|||
# TODO: Allow -x = -1*x
|
||||
|
||||
from functools import partialmethod
|
||||
from collections import namedtuple
|
||||
import operator as op
|
||||
|
||||
from parsimonious import Grammar, NodeVisitor
|
||||
from funcy import flatten
|
||||
from lenses import lens
|
||||
|
||||
from parsimonious import Grammar, NodeVisitor
|
||||
from stl import ast
|
||||
from stl.utils import implies, xor, iff, env, alw
|
||||
from stl.utils import alw, env, iff, implies, xor
|
||||
|
||||
STL_GRAMMAR = Grammar(u'''
|
||||
phi = (timed_until / until / neg / next / g / f / lineq / AP / or / and
|
||||
|
|
@ -60,9 +56,9 @@ __ = ~r"\s"*
|
|||
EOL = "\\n"
|
||||
''')
|
||||
|
||||
|
||||
oo = float('inf')
|
||||
|
||||
|
||||
class STLVisitor(NodeVisitor):
|
||||
def __init__(self, H=oo):
|
||||
super().__init__()
|
||||
|
|
@ -137,7 +133,6 @@ class STLVisitor(NodeVisitor):
|
|||
c = coeffs[0] if coeffs else 1
|
||||
return ast.Var(coeff=c, id=iden)
|
||||
|
||||
|
||||
def visit_terms(self, _, children):
|
||||
if isinstance(children[0], list):
|
||||
term, _1, sgn, _2, terms = children[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue