From 5fb3bb3c8bd6786c3f53b13abbca15996ce8e7db Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 31 May 2016 21:34:16 +0300 Subject: [PATCH] Minor refactoring: _search_conditions_dict => _comparison_operators --- m_librarian/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m_librarian/search.py b/m_librarian/search.py index ea292f7..5c1f47d 100644 --- a/m_librarian/search.py +++ b/m_librarian/search.py @@ -41,7 +41,7 @@ def _mk_search_conditions_with_operator(table, case_sensitive, comparison_op, return _expressions -_search_conditions_dict = { +_comparison_operators = { 'start': 'startswith', 'substring': 'contains', 'full': '__eq__', @@ -53,7 +53,7 @@ def mk_search_conditions(table, search_type, case_sensitive, values, if join_expressions is None: join_expressions = [] return _mk_search_conditions_with_operator( - table, case_sensitive, _search_conditions_dict[search_type], + table, case_sensitive, _comparison_operators[search_type], values, expressions) + join_expressions -- 2.39.5