mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 17:08:12 +01:00
Fix pyflakes issues, variable name
This commit is contained in:
parent
8d2fda790b
commit
62ee915aac
3 changed files with 4 additions and 4 deletions
|
|
@ -678,8 +678,8 @@ class DurationQuery(NumericQuery):
|
|||
return float(s)
|
||||
except ValueError:
|
||||
raise InvalidQueryArgumentTypeError(
|
||||
s,
|
||||
"a M:SS string or a float")
|
||||
s,
|
||||
"a M:SS string or a float")
|
||||
|
||||
|
||||
# Sorting.
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class DurationType(types.Float):
|
|||
def parse(self, string):
|
||||
try:
|
||||
# Try to format back hh:ss to seconds.
|
||||
return beets.ui.raw_seconds_short(value)
|
||||
return beets.ui.raw_seconds_short(string)
|
||||
except ValueError:
|
||||
# Fall back to a plain float..
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ def raw_seconds_short(string):
|
|||
if not match:
|
||||
raise ValueError('String not in M:SS format')
|
||||
minutes, seconds = map(int, match.groups())
|
||||
return float(minutes*60 + seconds)
|
||||
return float(minutes * 60 + seconds)
|
||||
|
||||
|
||||
# Colorization.
|
||||
|
|
|
|||
Loading…
Reference in a new issue