cleanup
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@
|
|||||||
# its just for some convenience targets.
|
# its just for some convenience targets.
|
||||||
|
|
||||||
# pep8 test
|
# pep8 test
|
||||||
PY_FILES=$(shell find $(PWD) -type f -name '*.py')
|
PY_FILES=$(shell find $(PWD)/bam -type f -name '*.py')
|
||||||
pep8:
|
pep8:
|
||||||
- flake8 $(PY_FILES) --ignore=E501,E302,E123,E126,E128,E129,E124,E122 > pep8.log
|
- flake8 $(PY_FILES) --ignore=E501,E302,E123,E126,E128,E129,E124,E122 > pep8.log
|
||||||
gvim --nofork -c "cfile pep8.log" -c "cope" -c "clast"
|
gvim --nofork -c "cfile pep8.log" -c "cope" -c "clast"
|
||||||
|
@@ -9,4 +9,3 @@ def main(argv=sys.argv):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main(sys.argv))
|
sys.exit(main(sys.argv))
|
||||||
|
|
||||||
|
@@ -350,7 +350,7 @@ def pack(
|
|||||||
assert(compress_level in range(-1, 10))
|
assert(compress_level in range(-1, 10))
|
||||||
_compress_level_orig = zlib.Z_DEFAULT_COMPRESSION
|
_compress_level_orig = zlib.Z_DEFAULT_COMPRESSION
|
||||||
zlib.Z_DEFAULT_COMPRESSION = compress_level
|
zlib.Z_DEFAULT_COMPRESSION = compress_level
|
||||||
_compress_mode = zipfile.ZIP_DEFLATED (compress_level == 0) if zipfile.ZIP_STORED else zipfile.ZIP_DEFLATED
|
_compress_mode = zipfile.ZIP_STORED if (compress_level == 0) else zipfile.ZIP_DEFLATED
|
||||||
if _compress_mode == zipfile.ZIP_STORED:
|
if _compress_mode == zipfile.ZIP_STORED:
|
||||||
is_compressed_filetype = lambda fn: False
|
is_compressed_filetype = lambda fn: False
|
||||||
else:
|
else:
|
||||||
@@ -428,8 +428,6 @@ def main():
|
|||||||
parser = create_argparse()
|
parser = create_argparse()
|
||||||
args = parser.parse_args(sys.argv[1:])
|
args = parser.parse_args(sys.argv[1:])
|
||||||
|
|
||||||
encoding = sys.getfilesystemencoding()
|
|
||||||
|
|
||||||
if args.use_quiet:
|
if args.use_quiet:
|
||||||
report = lambda msg: None
|
report = lambda msg: None
|
||||||
else:
|
else:
|
||||||
|
@@ -278,4 +278,3 @@ def finish(
|
|||||||
|
|
||||||
if use_json:
|
if use_json:
|
||||||
print("\"complete\"\n]")
|
print("\"complete\"\n]")
|
||||||
|
|
||||||
|
@@ -159,10 +159,11 @@ class FPElem_sequence_image_seq(FPElem_sequence_single):
|
|||||||
userdata = (block, path)
|
userdata = (block, path)
|
||||||
"""
|
"""
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
def files_siblings(self):
|
def files_siblings(self):
|
||||||
block, path, sub_block, sub_path = self.userdata
|
block, path, sub_block, sub_path = self.userdata
|
||||||
|
|
||||||
array = block.get_pointer(b'stripdata')
|
array = block.get_pointer(b'stripdata')
|
||||||
files = [array.get(b'name', use_str=False, base_index=i) for i in range(array.count)]
|
files = [array.get(b'name', use_str=False, base_index=i) for i in range(array.count)]
|
||||||
return files
|
return files
|
||||||
|
|
||||||
@@ -450,7 +451,6 @@ class FilePath:
|
|||||||
fp.is_sequence = True
|
fp.is_sequence = True
|
||||||
yield fp, extra_info
|
yield fp, extra_info
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _from_block_VF(block, basedir, extra_info, level):
|
def _from_block_VF(block, basedir, extra_info, level):
|
||||||
if block[b'packedfile']:
|
if block[b'packedfile']:
|
||||||
@@ -716,7 +716,6 @@ class ExpandID:
|
|||||||
elif item_type == C_defs.SEQ_TYPE_SOUND_RAM:
|
elif item_type == C_defs.SEQ_TYPE_SOUND_RAM:
|
||||||
yield item.get_pointer(b'sound')
|
yield item.get_pointer(b'sound')
|
||||||
|
|
||||||
|
|
||||||
yield from seqbase(bf_utils.iter_ListBase(block_ed.get_pointer(b'seqbase.first')))
|
yield from seqbase(bf_utils.iter_ListBase(block_ed.get_pointer(b'seqbase.first')))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@@ -862,7 +862,6 @@ class bam_commands:
|
|||||||
fatal("Path %r not found!" % p)
|
fatal("Path %r not found!" % p)
|
||||||
paths = [p.encode('utf-8') for p in paths]
|
paths = [p.encode('utf-8') for p in paths]
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists(filepath_remap):
|
if os.path.exists(filepath_remap):
|
||||||
fatal("Remap in progress, run with 'finish' or remove %r" % filepath_remap)
|
fatal("Remap in progress, run with 'finish' or remove %r" % filepath_remap)
|
||||||
|
|
||||||
|
@@ -123,4 +123,3 @@ def is_compressed_filetype(filepath):
|
|||||||
# '.gz', '.tgz',
|
# '.gz', '.tgz',
|
||||||
# '.zip',
|
# '.zip',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user