diff --git a/beets/dbcore/query.py b/beets/dbcore/query.py index 0ca749bb5..cc1892a1f 100644 --- a/beets/dbcore/query.py +++ b/beets/dbcore/query.py @@ -18,10 +18,6 @@ import re from operator import attrgetter from beets import util from datetime import datetime, timedelta -from collections import namedtuple - - -SortedQuery = namedtuple('SortedQuery', ['query', 'sort']) class Query(object): diff --git a/beets/dbcore/queryparse.py b/beets/dbcore/queryparse.py index bcd864e01..3d2855088 100644 --- a/beets/dbcore/queryparse.py +++ b/beets/dbcore/queryparse.py @@ -163,9 +163,6 @@ def parse_sorted_query(model_cls, parts, prefixes={}, query_cls=query.AndQuery): """Given a list of strings, create the `Query` and `Sort` that they represent. - - Return a `SortedQuery` namedtuple, which is a pair of a `Query` and - `Sort`. """ # Separate query token and sort token. query_parts = [] @@ -181,4 +178,4 @@ def parse_sorted_query(model_cls, parts, prefixes={}, query_cls, model_cls, prefixes, query_parts ) s = sort_from_strings(model_cls, sort_parts) - return query.SortedQuery(q, s) + return q, s diff --git a/beets/library.py b/beets/library.py index 69f8a1eb8..14f7e37d9 100644 --- a/beets/library.py +++ b/beets/library.py @@ -950,7 +950,7 @@ def parse_query_parts(parts, model_cls): # Add path queries to aggregate query. if path_parts: query.subqueries += [PathQuery('path', s) for s in path_parts] - return dbcore.query.SortedQuery(query, sort) + return query, sort def parse_query_string(s, model_cls):