From 79c79bfcc3b7c029ddf6cfbcc9ae80f671311e18 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 14 Mar 2013 10:12:20 -0700 Subject: [PATCH] refactor query parsing It's long overdue that the parsing of individual query components was moved out of classes and into top-level functions, where it belongs. --- beets/library.py | 172 ++++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 84 deletions(-) diff --git a/beets/library.py b/beets/library.py index c8460955d..876b0961f 100644 --- a/beets/library.py +++ b/beets/library.py @@ -589,53 +589,6 @@ class CollectionQuery(Query): clause = (' ' + joiner + ' ').join(clause_parts) return clause, subvals - # Regular expression for _parse_query_part, below. - _pq_regex = re.compile( - # Non-capturing optional segment for the keyword. - r'(?:' - r'(\S+?)' # The field key. - r'(?