mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 09:04:33 +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
|
# move in-library files. (Out-of-library files are
|
||||||
# copied/moved as usual).
|
# copied/moved as usual).
|
||||||
old_path = item.path
|
old_path = item.path
|
||||||
if (copy or link or hardlink) and self.replaced_items[item] and \
|
if (copy or link or hardlink) and self.replaced_items[item] \
|
||||||
session.lib.directory in util.ancestry(old_path):
|
and session.lib.directory in util.ancestry(old_path):
|
||||||
item.move()
|
item.move()
|
||||||
# We moved the item, so remove the
|
# We moved the item, so remove the
|
||||||
# now-nonexistent file from old_paths.
|
# now-nonexistent file from old_paths.
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,7 @@ option to preserve the metadata on the linked files.
|
||||||
.. _hardlink:
|
.. _hardlink:
|
||||||
|
|
||||||
hardlink
|
hardlink
|
||||||
~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
Either ``yes`` or ``no``, indicating whether to use hard links instead of
|
Either ``yes`` or ``no``, indicating whether to use hard links instead of
|
||||||
moving or copying or symlinking files. (It conflicts with the ``move``,
|
moving or copying or symlinking files. (It conflicts with the ``move``,
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class MoveTest(_common.TestCase):
|
||||||
s1 = os.stat(self.path)
|
s1 = os.stat(self.path)
|
||||||
s2 = os.stat(self.dest)
|
s2 = os.stat(self.dest)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
(s1[stat.ST_INO], s1[stat.ST_DEV]) == \
|
(s1[stat.ST_INO], s1[stat.ST_DEV]) ==
|
||||||
(s2[stat.ST_INO], s2[stat.ST_DEV])
|
(s2[stat.ST_INO], s2[stat.ST_DEV])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,7 @@ class NonAutotaggedImportTest(_common.TestCase, ImportHelper):
|
||||||
s1 = os.stat(mediafile.path)
|
s1 = os.stat(mediafile.path)
|
||||||
s2 = os.stat(filename)
|
s2 = os.stat(filename)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
(s1[stat.ST_INO], s1[stat.ST_DEV]) == \
|
(s1[stat.ST_INO], s1[stat.ST_DEV]) ==
|
||||||
(s2[stat.ST_INO], s2[stat.ST_DEV])
|
(s2[stat.ST_INO], s2[stat.ST_DEV])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,7 @@ class SafetyTest(unittest.TestCase, _common.TempDirMixin):
|
||||||
finally:
|
finally:
|
||||||
os.unlink(fn)
|
os.unlink(fn)
|
||||||
|
|
||||||
|
|
||||||
class SideEffectsTest(unittest.TestCase):
|
class SideEffectsTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.empty = os.path.join(_common.RSRC, b'empty.mp3')
|
self.empty = os.path.join(_common.RSRC, b'empty.mp3')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue