Done with flake8

This commit is contained in:
Reid 'arrdem' McKenzie 2021-08-30 01:06:21 -06:00
commit 4f2ee8e021
18 changed files with 66 additions and 71 deletions
projects/datalog

View file

@ -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

View file

@ -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

View file

@ -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).