[Bf-extensions-cvs] [738e1fa] temp-blend-utils: Cleanup: minor pep8
Campbell Barton
noreply at git.blender.org
Fri Jan 29 07:21:08 CET 2016
Commit: 738e1fa660c52498cc1aa9c01ef09e6d8bca1206
Author: Campbell Barton
Date: Fri Jan 29 17:09:09 2016 +1100
Branches: temp-blend-utils
https://developer.blender.org/rBA738e1fa660c52498cc1aa9c01ef09e6d8bca1206
Cleanup: minor pep8
===================================================================
M io_blend_utils/__init__.py
M io_blend_utils/blendfile_pack.py
===================================================================
diff --git a/io_blend_utils/__init__.py b/io_blend_utils/__init__.py
index 0c8cf3c..e571867 100644
--- a/io_blend_utils/__init__.py
+++ b/io_blend_utils/__init__.py
@@ -32,7 +32,6 @@ bl_info = {
import bpy
from bpy.types import Operator
from bpy_extras.io_utils import ExportHelper
-from bpy.props import PointerProperty, StringProperty
from .bl_utils.subprocess_helper import SubprocessHelper
@@ -99,6 +98,7 @@ def register():
bpy.types.INFO_MT_file_external_data.append(menu_func)
+
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
@@ -108,6 +108,3 @@ def unregister():
if __name__ == "__main__":
register()
-
-
-
diff --git a/io_blend_utils/blendfile_pack.py b/io_blend_utils/blendfile_pack.py
index f905884..161b887 100755
--- a/io_blend_utils/blendfile_pack.py
+++ b/io_blend_utils/blendfile_pack.py
@@ -171,7 +171,8 @@ def pack(
TEMP_SUFFIX = b'@'
if report is None:
- report = lambda msg: msg
+ def report(msg):
+ return msg
yield report("%s: %r...\n" % (colorize("\nscanning deps", color='bright_green'), blendfile_src))
@@ -333,7 +334,6 @@ def pack(
yield report(" %s: %r\n" % (colorize("exclude", color='yellow'), path_src))
continue
-
# apply variation (if available)
if use_variations:
if blendfile_levels_dict_curr:
@@ -379,8 +379,8 @@ def pack(
_dst_dir = os.path.dirname(path_dst)
path_copy_files.update(
{(os.path.join(_src_dir, f), os.path.join(_dst_dir, f))
- for f in file_list
- })
+ for f in file_list
+ })
del _src_dir, _dst_dir
if deps_remap is not None:
@@ -412,9 +412,11 @@ def pack(
if paths_remap is not None:
if paths_remap_relbase is not None:
- relbase = lambda fn: os.path.relpath(fn, paths_remap_relbase)
+ def relbase(fn):
+ return os.path.relpath(fn, paths_remap_relbase)
else:
- relbase = lambda fn: fn
+ def relbase(fn):
+ return fn
for src, dst in path_copy_files:
# TODO. relative to project-basepath
@@ -491,7 +493,8 @@ def pack(
zlib.Z_DEFAULT_COMPRESSION = compress_level
_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
+ def is_compressed_filetype(fn):
+ return False
else:
from utils.system import is_compressed_filetype
More information about the Bf-extensions-cvs
mailing list