Fix linter issues

This commit is contained in:
Jacob Gillespie 2017-02-19 17:33:26 -06:00
parent 902b955696
commit 1fd22604fb
5 changed files with 8 additions and 7 deletions

View file

@ -671,8 +671,8 @@ class ImportTask(BaseImportTask):
# move in-library files. (Out-of-library files are
# copied/moved as usual).
old_path = item.path
if (copy or link or hardlink) and self.replaced_items[item] and \
session.lib.directory in util.ancestry(old_path):
if (copy or link or hardlink) and self.replaced_items[item] \
and session.lib.directory in util.ancestry(old_path):
item.move()
# We moved the item, so remove the
# now-nonexistent file from old_paths.

View file

@ -445,7 +445,7 @@ option to preserve the metadata on the linked files.
.. _hardlink:
hardlink
~~~~
~~~~~~~~
Either ``yes`` or ``no``, indicating whether to use hard links instead of
moving or copying or symlinking files. (It conflicts with the ``move``,

View file

@ -148,8 +148,8 @@ class MoveTest(_common.TestCase):
s1 = os.stat(self.path)
s2 = os.stat(self.dest)
self.assertTrue(
(s1[stat.ST_INO], s1[stat.ST_DEV]) == \
(s2[stat.ST_INO], s2[stat.ST_DEV])
(s1[stat.ST_INO], s1[stat.ST_DEV]) ==
(s2[stat.ST_INO], s2[stat.ST_DEV])
)
@unittest.skipUnless(_common.HAVE_HARDLINK, "need hardlinks")

View file

@ -370,8 +370,8 @@ class NonAutotaggedImportTest(_common.TestCase, ImportHelper):
s1 = os.stat(mediafile.path)
s2 = os.stat(filename)
self.assertTrue(
(s1[stat.ST_INO], s1[stat.ST_DEV]) == \
(s2[stat.ST_INO], s2[stat.ST_DEV])
(s1[stat.ST_INO], s1[stat.ST_DEV]) ==
(s2[stat.ST_INO], s2[stat.ST_DEV])
)

View file

@ -197,6 +197,7 @@ class SafetyTest(unittest.TestCase, _common.TempDirMixin):
finally:
os.unlink(fn)
class SideEffectsTest(unittest.TestCase):
def setUp(self):
self.empty = os.path.join(_common.RSRC, b'empty.mp3')