Cleanup: pep8
This commit is contained in:
@@ -136,7 +136,6 @@ class BlendFile:
|
||||
# cache (could lazy init, incase we never use?)
|
||||
self.block_from_offset = {block.addr_old: block for block in self.blocks if block.code != b'ENDB'}
|
||||
|
||||
|
||||
def find_blocks_from_code(self, code):
|
||||
assert(type(code) == bytes)
|
||||
if code not in self.code_index:
|
||||
@@ -243,7 +242,6 @@ class BlendFile:
|
||||
sdna_index_from_id[dna_struct.dna_type_id] = sdna_index
|
||||
structs.append(dna_struct)
|
||||
|
||||
|
||||
fields_len = d[1]
|
||||
dna_offset = 0
|
||||
|
||||
@@ -394,7 +392,6 @@ class BlendFileBlock:
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
# ----------------------
|
||||
# Python convenience API
|
||||
|
||||
@@ -481,7 +478,6 @@ class BlendFileHeader:
|
||||
)))
|
||||
|
||||
|
||||
|
||||
class DNAName:
|
||||
"""
|
||||
DNAName is a C-type name stored in the DNA
|
||||
|
@@ -21,8 +21,10 @@
|
||||
VERBOSE = True
|
||||
TIMEIT = True
|
||||
|
||||
|
||||
class C_defs:
|
||||
__slots__ = ()
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
raise RuntimeError("%s should not be instantiated" % cls)
|
||||
|
||||
@@ -570,7 +572,6 @@ class ExpandID:
|
||||
|
||||
yield block.get_pointer(b'group')
|
||||
|
||||
|
||||
@staticmethod
|
||||
def expand_TE(block): # 'Tex'
|
||||
yield from ExpandID._expand_generic_animdata(block)
|
||||
|
@@ -96,7 +96,6 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
||||
path_temp_files.add(filepath_tmp)
|
||||
return filepath_tmp
|
||||
|
||||
|
||||
# base_dir_src = os.path.dirname(blendfile_src)
|
||||
base_dir_dst = os.path.dirname(blendfile_dst)
|
||||
|
||||
@@ -184,7 +183,6 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
||||
del blendfile_dst_tmp
|
||||
del sha1_from_file
|
||||
|
||||
|
||||
# --------------------
|
||||
# Handle File Copy/Zip
|
||||
|
||||
@@ -232,6 +230,7 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
||||
|
||||
if WRITE_JSON_REMAP:
|
||||
import json
|
||||
|
||||
def write_dict_as_json(fn, dct):
|
||||
zip.writestr(
|
||||
fn,
|
||||
@@ -250,7 +249,6 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
||||
|
||||
del write_dict_as_json
|
||||
|
||||
|
||||
yield report(" %s: %r\n" % (colorize("written", color='green'), blendfile_dst))
|
||||
else:
|
||||
raise Exception("%s not a known mode" % mode)
|
||||
@@ -316,7 +314,6 @@ def main():
|
||||
sort_keys=True, indent=4, separators=(',', ': '),
|
||||
)
|
||||
|
||||
|
||||
if deps_remap is not None:
|
||||
write_dict_as_json(args.deps_remap, deps_remap)
|
||||
|
||||
|
Reference in New Issue
Block a user