diff --git a/blender_asset_tracer/blendfile/__init__.py b/blender_asset_tracer/blendfile/__init__.py index 9516b78..3894b16 100644 --- a/blender_asset_tracer/blendfile/__init__.py +++ b/blender_asset_tracer/blendfile/__init__.py @@ -626,7 +626,6 @@ class BlendFileBlock: the_bytes = the_bytes[:first_null] return the_bytes.decode() - def get_recursive_iter( self, path: dna.FieldPath, diff --git a/blender_asset_tracer/pack/__init__.py b/blender_asset_tracer/pack/__init__.py index 3a60bc4..f3ac76c 100644 --- a/blender_asset_tracer/pack/__init__.py +++ b/blender_asset_tracer/pack/__init__.py @@ -102,7 +102,7 @@ class Packer: *, noop=False, compress=False, - relative_only=False + relative_only=False, ) -> None: self.blendfile = bfile self.project = project @@ -475,8 +475,9 @@ class Packer: # It is *not* used for any disk I/O, since the file may not even # exist on the local filesystem. bfile_pp = action.new_path - assert bfile_pp is not None, \ - f"Action {action.path_action.name} on {bfile_path} has no final path set, unable to process" + assert ( + bfile_pp is not None + ), f"Action {action.path_action.name} on {bfile_path} has no final path set, unable to process" # Use tempfile to create a unique name in our temporary directoy. # The file should be deleted when self.close() is called, and not diff --git a/tests/test_bpathlib.py b/tests/test_bpathlib.py index 6ec9b37..aa0a757 100644 --- a/tests/test_bpathlib.py +++ b/tests/test_bpathlib.py @@ -39,7 +39,7 @@ class BlendPathTest(unittest.TestCase): PurePath("C:/some/file.blend"), BlendPath(b"C:/some/file.blend").to_path() ) self.assertEqual( - PurePath("C:/some/file.blend"), BlendPath(br"C:\some\file.blend").to_path() + PurePath("C:/some/file.blend"), BlendPath(rb"C:\some\file.blend").to_path() ) with mock.patch("sys.getfilesystemencoding") as mock_getfse: diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 34e11ee..bda1519 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -62,6 +62,7 @@ class AssetHoldingBlocksTest(AbstractTracerTest): self.assertEqual(965, len(self.bf.blocks)) self.assertEqual(4, blocks_seen) + class DepsTest(AbstractTracerTest): @staticmethod def field_name(field: dna.Field) -> typing.Optional[str]: @@ -191,11 +192,11 @@ class DepsTest(AbstractTracerTest): def test_seq_image_udim_sequence(self): expects = { b"IMcube_UDIM.color": Expect( - 'Image', - 'name[1024]', + "Image", + "name[1024]", None, None, - b'//cube_UDIM.color..png', + b"//cube_UDIM.color..png", True, ), } diff --git a/tests/test_tracer_file_sequence.py b/tests/test_tracer_file_sequence.py index a074a12..7bad6de 100644 --- a/tests/test_tracer_file_sequence.py +++ b/tests/test_tracer_file_sequence.py @@ -24,7 +24,8 @@ class ExpandFileSequenceTest(AbstractBlendFileTest): path = self.blendfiles / "udim/cube_UDIM.color..png" actual = list(file_sequence.expand_sequence(path)) imgseq = [ - self.blendfiles / ("udim/cube_UDIM.color.%04d.png" % num) for num in range(1001, 1004) + self.blendfiles / ("udim/cube_UDIM.color.%04d.png" % num) + for num in range(1001, 1004) ] self.assertEqual(imgseq, actual)