mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Fix linter issues
This commit is contained in:
parent
902b955696
commit
1fd22604fb
5 changed files with 8 additions and 7 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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``,
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue