diff --git a/Makefile b/Makefile index 031ddfc..0aa502c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # its just for some convenience targets. # pep8 test -PY_FILES=$(shell find $(PWD) -type f -name '*.py') +PY_FILES=$(shell find $(PWD)/bam -type f -name '*.py') pep8: - flake8 $(PY_FILES) --ignore=E501,E302,E123,E126,E128,E129,E124,E122 > pep8.log gvim --nofork -c "cfile pep8.log" -c "cope" -c "clast" diff --git a/bam/__init__.py b/bam/__init__.py index d4d2831..8cb8344 100644 --- a/bam/__init__.py +++ b/bam/__init__.py @@ -9,4 +9,3 @@ def main(argv=sys.argv): if __name__ == '__main__': sys.exit(main(sys.argv)) - diff --git a/bam/blend/blendfile_pack.py b/bam/blend/blendfile_pack.py index 5e8d18e..ca5a3d5 100755 --- a/bam/blend/blendfile_pack.py +++ b/bam/blend/blendfile_pack.py @@ -350,7 +350,7 @@ def pack( assert(compress_level in range(-1, 10)) _compress_level_orig = zlib.Z_DEFAULT_COMPRESSION 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: is_compressed_filetype = lambda fn: False else: @@ -428,8 +428,6 @@ def main(): parser = create_argparse() args = parser.parse_args(sys.argv[1:]) - encoding = sys.getfilesystemencoding() - if args.use_quiet: report = lambda msg: None else: diff --git a/bam/blend/blendfile_path_remap.py b/bam/blend/blendfile_path_remap.py index d424391..3b792c3 100644 --- a/bam/blend/blendfile_path_remap.py +++ b/bam/blend/blendfile_path_remap.py @@ -278,4 +278,3 @@ def finish( if use_json: print("\"complete\"\n]") - diff --git a/bam/blend/blendfile_path_walker.py b/bam/blend/blendfile_path_walker.py index df5f6f8..e49c5d7 100644 --- a/bam/blend/blendfile_path_walker.py +++ b/bam/blend/blendfile_path_walker.py @@ -159,10 +159,11 @@ class FPElem_sequence_image_seq(FPElem_sequence_single): userdata = (block, path) """ __slots__ = () + def files_siblings(self): 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)] return files @@ -450,7 +451,6 @@ class FilePath: fp.is_sequence = True yield fp, extra_info - @staticmethod def _from_block_VF(block, basedir, extra_info, level): if block[b'packedfile']: @@ -716,7 +716,6 @@ class ExpandID: elif item_type == C_defs.SEQ_TYPE_SOUND_RAM: yield item.get_pointer(b'sound') - yield from seqbase(bf_utils.iter_ListBase(block_ed.get_pointer(b'seqbase.first'))) @staticmethod diff --git a/bam/cli.py b/bam/cli.py index 28ec94b..df00b39 100755 --- a/bam/cli.py +++ b/bam/cli.py @@ -862,7 +862,6 @@ class bam_commands: fatal("Path %r not found!" % p) paths = [p.encode('utf-8') for p in paths] - if os.path.exists(filepath_remap): fatal("Remap in progress, run with 'finish' or remove %r" % filepath_remap) diff --git a/bam/utils/system.py b/bam/utils/system.py index 4bfc26a..3aee356 100644 --- a/bam/utils/system.py +++ b/bam/utils/system.py @@ -123,4 +123,3 @@ def is_compressed_filetype(filepath): # '.gz', '.tgz', # '.zip', } -