mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 21:12:43 +01:00
Fix minor formatting and comments issues.
This commit is contained in:
parent
18539b0bd1
commit
cd1dcf6969
4 changed files with 5 additions and 5 deletions
|
|
@ -505,7 +505,7 @@ class Results(object):
|
|||
predicate.
|
||||
"""
|
||||
if self.sort:
|
||||
# slow sort, must build the full list first
|
||||
# Slow sort. Must build the full list first.
|
||||
objects = []
|
||||
for row in self.rows:
|
||||
obj = self._generate_results(row)
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ class Sort(object):
|
|||
|
||||
|
||||
class MultipleSort(Sort):
|
||||
""" Sort class that combines several sort criteria.
|
||||
"""Sort class that combines several sort criteria.
|
||||
This implementation tries to implement as many sort operation in sql,
|
||||
falling back to python sort only when necessary.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -150,4 +150,4 @@ def sort_from_strings(model_cls, sort_parts):
|
|||
sort = query.MultipleSort()
|
||||
for part in sort_parts:
|
||||
sort.add_criteria(construct_sort_part(model_cls, part))
|
||||
return sort
|
||||
return sort
|
||||
|
|
|
|||
|
|
@ -942,10 +942,10 @@ def get_query(val, model_cls):
|
|||
# Add path queries to aggregate query.
|
||||
if path_parts:
|
||||
query.subqueries += [PathQuery('path', s) for s in path_parts]
|
||||
return (query, sort)
|
||||
return query, sort
|
||||
|
||||
elif isinstance(val, dbcore.Query):
|
||||
return (val, None)
|
||||
return val, None
|
||||
|
||||
else:
|
||||
raise ValueError('query must be None or have type Query or str')
|
||||
|
|
|
|||
Loading…
Reference in a new issue