mirror of
https://github.com/beetbox/beets.git
synced 2026-01-01 21:42:48 +01:00
Remove SortedQuery (#953)
This turned out to be less useful than I was hoping.
This commit is contained in:
parent
eb89d3a850
commit
e2b3fafefa
3 changed files with 2 additions and 9 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue