Done with flake8
This commit is contained in:
parent
4664b4353c
commit
4f2ee8e021
18 changed files with 66 additions and 71 deletions
projects/datalog
|
@ -19,7 +19,7 @@ def match(tuple, expr, bindings=None):
|
|||
# This may not work out long term.
|
||||
if isinstance(a, LVar) and isinstance(b, LVar):
|
||||
continue
|
||||
elif isinstance(a, LVar) and not a in bindings and isinstance(b, Constant):
|
||||
elif isinstance(a, LVar) and a not in bindings and isinstance(b, Constant):
|
||||
bindings[a] = b
|
||||
elif isinstance(a, LVar) and a in bindings and bindings[a] == b:
|
||||
continue
|
||||
|
|
|
@ -4,7 +4,7 @@ A datalog reader.
|
|||
|
||||
from collections import defaultdict
|
||||
|
||||
from datalog.parser import FAILURE, Grammar
|
||||
from datalog.parser import FAILURE, Grammar, ParseError
|
||||
from datalog.types import Constant, Dataset, LVar, Rule
|
||||
|
||||
|
||||
|
|
|
@ -73,9 +73,6 @@ def test_lvar_unification(db_cls):
|
|||
def test_rule_join(db_cls):
|
||||
"""Test a basic join query - the parent -> grandparent relation."""
|
||||
|
||||
child = Constant("child")
|
||||
gc = Constant("grandchild")
|
||||
|
||||
d = read(
|
||||
"""
|
||||
child(a, b).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue