diff --git a/beets/util/confit.py b/beets/util/confit.py index c30e52c5d..110d00001 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -602,11 +602,11 @@ class Dumper(yaml.SafeDumper): for item_key, item_value in mapping: node_key = self.represent_data(item_key) node_value = self.represent_data(item_value) - if not (isinstance(node_key, yaml.ScalarNode) - and not node_key.style): + if not (isinstance(node_key, yaml.ScalarNode) and + not node_key.style): best_style = False - if not (isinstance(node_value, yaml.ScalarNode) - and not node_value.style): + if not (isinstance(node_value, yaml.ScalarNode) and + not node_value.style): best_style = False value.append((node_key, node_value)) if flow_style is None: diff --git a/beets/util/functemplate.py b/beets/util/functemplate.py index f1066761d..3d5b0e871 100644 --- a/beets/util/functemplate.py +++ b/beets/util/functemplate.py @@ -309,8 +309,8 @@ class Parser(object): # A non-special character. Skip to the next special # character, treating the interstice as literal text. next_pos = ( - self.special_char_re.search(self.string[self.pos:]).start() - + self.pos + self.special_char_re.search( + self.string[self.pos:]).start() + self.pos ) text_parts.append(self.string[self.pos:next_pos]) self.pos = next_pos diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index c021d7465..e40c3a7d4 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -166,8 +166,8 @@ class MPDStats(object): else: rolling = (rating + (1.0 - rating) / 2.0) stable = (play_count + 1.0) / (play_count + skip_count + 2.0) - return (self.rating_mix * stable - + (1.0 - self.rating_mix) * rolling) + return (self.rating_mix * stable + + (1.0 - self.rating_mix) * rolling) def get_item(self, path): """Return the beets item related to path. diff --git a/setup.py b/setup.py index 76669c62c..a87b155bc 100755 --- a/setup.py +++ b/setup.py @@ -82,9 +82,8 @@ setup( 'unidecode', 'musicbrainzngs>=0.4', 'pyyaml', - ] - + (['colorama'] if (sys.platform == 'win32') else []) - + (['ordereddict'] if sys.version_info < (2, 7, 0) else []), + ] + (['colorama'] if (sys.platform == 'win32') else []) + + (['ordereddict'] if sys.version_info < (2, 7, 0) else []), tests_require=[ 'beautifulsoup4', diff --git a/test/test_ui.py b/test/test_ui.py index 07add2fcd..d2a2ea80e 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -968,8 +968,8 @@ class ShowChangeTest(_common.TestCase): self.items[0].title = u'' self.items[0].path = u'/path/to/caf\xe9.mp3'.encode('utf8') msg = re.sub(r' +', ' ', self._show_change()) - self.assertTrue(u'caf\xe9.mp3 -> the title' in msg - or u'caf.mp3 ->' in msg) + self.assertTrue(u'caf\xe9.mp3 -> the title' in msg or + u'caf.mp3 ->' in msg) class PathFormatTest(_common.TestCase):