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()
|
||||
# receives an iterable as it expects. It just happens to be 1 tree.
|
||||
trees = {}
|
||||
for (key, value) in terms.items():
|
||||
if value == []:
|
||||
trees[key] = []
|
||||
for (term_type, term_expression) in terms.items():
|
||||
if term_expression == []:
|
||||
trees[term_type] = []
|
||||
continue
|
||||
tree = ' '.join(value)
|
||||
tree = ' '.join(term_expression)
|
||||
tree = expressionmatch.ExpressionTree.parse(tree)
|
||||
if not case_sensitive:
|
||||
tree.map(str.lower)
|
||||
trees[key] = [tree]
|
||||
trees[term_type] = [tree]
|
||||
terms = trees
|
||||
|
||||
elif not case_sensitive:
|
||||
|
|
Loading…
Reference in a new issue