Cleanup: reformat with Black
This commit is contained in:
parent
3daeb9f80a
commit
63c4745e9f
@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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 '<UDIM>' not in asset_path.name:
|
||||
if "*" not in str(asset_path) and "<UDIM>" not in asset_path.name:
|
||||
packed_path = action.new_path
|
||||
assert packed_path is not None
|
||||
read_path = action.read_from or asset_path
|
||||
|
||||
@ -43,7 +43,7 @@ def expand_sequence(path: pathlib.Path) -> typing.Iterator[pathlib.Path]:
|
||||
# Change <UDIM> 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('<UDIM>', '*'))
|
||||
path = path.with_name(path.name.replace("<UDIM>", "*"))
|
||||
|
||||
if "*" in str(path): # assume it is a glob
|
||||
import glob
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user