From ea4832e212c97f4d9c763767ca2ea402d6da00f3 Mon Sep 17 00:00:00 2001 From: Dietrich Daroch Date: Wed, 30 Jul 2014 14:35:19 -0400 Subject: [PATCH] [PEP8] I didn't had a pep8 checker on vim :c --- beets/util/__init__.py | 13 ++++++++----- beetsplug/convert.py | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 6b8cf6647..e91a12f91 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -202,21 +202,24 @@ def sorted_walk(path, ignore=(), logger=None): yield res -#We don't create directories on dry-runs, but we must pretend they exist +# We don't create directories on dry-runs, but we must pretend they exist directories_created = Set() + + def mkdirall(path, pretend=False): """Make all the enclosing directories of path (like mkdir -p on the parent). """ if pretend: - #directory = syspath(ancestry(path)[-1]) # "dirname" - # This seems cleaner but MAY have differences on symlinks (leading to an equivalent result) + # directory = syspath(ancestry(path)[-1]) # "dirname" + # This seems cleaner but MAY have differences on symlinks (leading to + # an equivalent result) directory = os.path.dirname(path) if directory not in directories_created: directories_created.add(directory) - #This is not a "raw" translation, but it's brief one - print("mkdir -p '%s'" % (directory) ) + # This is not a "raw" translation, but it's brief one + print("mkdir -p '%s'" % (directory)) return for ancestor in ancestry(path): if not os.path.isdir(syspath(ancestor)): diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 8fce6d19f..8bf048039 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -178,8 +178,8 @@ def convert_item(dest_dir, keep_new, path_formats, pretend=False): continue if pretend: - #Should we add support for tagging and after_convert plugins? - continue #A yield is used at the start of the loop + # Should we add support for tagging and after_convert plugins? + continue # A yield is used at the start of the loop # Write tags from the database to the converted file. item.write(path=converted)