Rename these key, value variables to give better context.

This commit is contained in:
voussoir 2020-01-25 01:08:50 -08:00
parent 2dc7e75414
commit ea415b953c

View file

@ -130,15 +130,15 @@ def search(
# The value still needs to be a list so the upcoming any() / all() # The value still needs to be a list so the upcoming any() / all()
# receives an iterable as it expects. It just happens to be 1 tree. # receives an iterable as it expects. It just happens to be 1 tree.
trees = {} trees = {}
for (key, value) in terms.items(): for (term_type, term_expression) in terms.items():
if value == []: if term_expression == []:
trees[key] = [] trees[term_type] = []
continue continue
tree = ' '.join(value) tree = ' '.join(term_expression)
tree = expressionmatch.ExpressionTree.parse(tree) tree = expressionmatch.ExpressionTree.parse(tree)
if not case_sensitive: if not case_sensitive:
tree.map(str.lower) tree.map(str.lower)
trees[key] = [tree] trees[term_type] = [tree]
terms = trees terms = trees
elif not case_sensitive: elif not case_sensitive: