Rename these key, value variables to give better context.
This commit is contained in:
parent
2dc7e75414
commit
ea415b953c
1 changed files with 5 additions and 5 deletions
10
search.py
10
search.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue