diff --git a/blender_asset_tracer/blendfile/dna_io.py b/blender_asset_tracer/blendfile/dna_io.py index 3c761e6..ac46794 100644 --- a/blender_asset_tracer/blendfile/dna_io.py +++ b/blender_asset_tracer/blendfile/dna_io.py @@ -45,7 +45,9 @@ class EndianIO: raise struct.error("%s (read %d bytes)" % (ex, len(data))) from None @classmethod - def _write(cls, fileobj: typing.IO[bytes], typestruct: struct.Struct, value: typing.Any): + def _write( + cls, fileobj: typing.IO[bytes], typestruct: struct.Struct, value: typing.Any + ): try: data = typestruct.pack(value) except struct.error as ex: @@ -210,7 +212,7 @@ class EndianIO: b"uint": cls.write_uint, b"int": cls.write_int, b"ulong": cls.write_ulong, - b"float": cls.write_float + b"float": cls.write_float, } diff --git a/blender_asset_tracer/compressor.py b/blender_asset_tracer/compressor.py index d9ceac3..2f6b56d 100644 --- a/blender_asset_tracer/compressor.py +++ b/blender_asset_tracer/compressor.py @@ -10,7 +10,7 @@ from blender_asset_tracer.blendfile import magic_compression log = logging.getLogger(__name__) # Arbitrarily chosen block size, in bytes. -BLOCK_SIZE = 256 * 2 ** 10 +BLOCK_SIZE = 256 * 2**10 def move(src: pathlib.Path, dest: pathlib.Path): diff --git a/blender_asset_tracer/pack/__init__.py b/blender_asset_tracer/pack/__init__.py index d9c89be..72980b6 100644 --- a/blender_asset_tracer/pack/__init__.py +++ b/blender_asset_tracer/pack/__init__.py @@ -554,7 +554,7 @@ class Packer: def _copy_asset_and_deps(self, asset_path: pathlib.Path, action: AssetAction): # Copy the asset itself, but only if it's not a sequence (sequences are # handled below in the for-loop). - if "*" not in str(asset_path) and '' not in asset_path.name: + if "*" not in str(asset_path) and "" not in asset_path.name: packed_path = action.new_path assert packed_path is not None read_path = action.read_from or asset_path diff --git a/blender_asset_tracer/trace/file_sequence.py b/blender_asset_tracer/trace/file_sequence.py index 8e37418..f5d4344 100644 --- a/blender_asset_tracer/trace/file_sequence.py +++ b/blender_asset_tracer/trace/file_sequence.py @@ -39,11 +39,11 @@ def expand_sequence(path: pathlib.Path) -> typing.Iterator[pathlib.Path]: or the path of the first file in the sequence. """ - if "" in path.name: # UDIM tiles + if "" in path.name: # UDIM tiles # Change marker to a glob pattern, then let the glob case handle it. # This assumes that all files that match the glob are actually UDIM # tiles; this could cause some false-positives. - path = path.with_name(path.name.replace('', '*')) + path = path.with_name(path.name.replace("", "*")) if "*" in str(path): # assume it is a glob import glob