From 62ee915aac952d3d0af3a3bc22cda453cde721be Mon Sep 17 00:00:00 2001 From: Diego Moreda Date: Sat, 5 Dec 2015 14:12:27 +0100 Subject: [PATCH] Fix pyflakes issues, variable name --- beets/dbcore/query.py | 4 ++-- beets/library.py | 2 +- beets/ui/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/beets/dbcore/query.py b/beets/dbcore/query.py index 9308ba0b3..a33a2946a 100644 --- a/beets/dbcore/query.py +++ b/beets/dbcore/query.py @@ -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. diff --git a/beets/library.py b/beets/library.py index 77c4bf8ab..d8eb9d5d3 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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: diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 10266b537..3a25a03ff 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -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.