[Bf-blender-cvs] [d924998] master: Cleanup: pep8
Campbell Barton
noreply at git.blender.org
Sun Jan 31 14:55:49 CET 2016
Commit: d924998d3e65334c5db2257c5dc4335261adc288
Author: Campbell Barton
Date: Mon Feb 1 00:47:10 2016 +1100
Branches: master
https://developer.blender.org/rBd924998d3e65334c5db2257c5dc4335261adc288
Cleanup: pep8
===================================================================
M build_files/buildbot/master.cfg
M build_files/cmake/cmake_consistency_check.py
M build_files/cmake/cmake_netbeans_project.py
M doc/python_api/examples/gpu.offscreen.1.py
M doc/python_api/rst_from_bmesh_opdefines.py
M intern/cycles/blender/addon/properties.py
M intern/cycles/blender/addon/ui.py
M release/scripts/modules/bpy/path.py
M release/scripts/modules/bpy_extras/image_utils.py
M release/scripts/modules/bpy_extras/io_utils.py
M release/scripts/modules/bpy_types.py
M release/scripts/modules/sys_info.py
M release/scripts/startup/bl_ui/properties_constraint.py
M release/scripts/startup/bl_ui/properties_data_modifier.py
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M release/scripts/startup/bl_ui/properties_texture.py
M release/scripts/startup/bl_ui/space_clip.py
M release/scripts/startup/bl_ui/space_image.py
M release/scripts/startup/bl_ui/space_node.py
M release/scripts/startup/bl_ui/space_sequencer.py
M release/scripts/startup/bl_ui/space_view3d.py
M tests/python/bl_mesh_modifiers.py
M tests/python/bl_run_operators.py
M tests/python/rst_to_doctree_mini.py
===================================================================
diff --git a/build_files/buildbot/master.cfg b/build_files/buildbot/master.cfg
index c054723..2fc337a 100644
--- a/build_files/buildbot/master.cfg
+++ b/build_files/buildbot/master.cfg
@@ -329,7 +329,7 @@ authz_cfg = authz.Authz(
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
-#c['status'].append(html.WebStatus(http_port=8010))
+# c['status'].append(html.WebStatus(http_port=8010))
# PROJECT IDENTITY
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index d0bbdda..7ad4726 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -278,7 +278,6 @@ def main():
# Write a 'sed' script, useful if we get a lot of these
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
-
if is_err:
raise Exception("CMake referenecs missing files, aborting!")
del is_err
diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py
index d57bce7..8d66c10 100755
--- a/build_files/cmake/cmake_netbeans_project.py
+++ b/build_files/cmake/cmake_netbeans_project.py
@@ -81,7 +81,6 @@ def create_nb_project_main():
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get()
-
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
make_exe_basename = os.path.basename(make_exe)
diff --git a/doc/python_api/examples/gpu.offscreen.1.py b/doc/python_api/examples/gpu.offscreen.1.py
index 06f0d91..75ddf80 100644
--- a/doc/python_api/examples/gpu.offscreen.1.py
+++ b/doc/python_api/examples/gpu.offscreen.1.py
@@ -63,7 +63,6 @@ class OffScreenDraw(bpy.types.Operator):
render.pixel_aspect_y,
)
-
offscreen.draw_view3d(
scene,
context.space_data,
diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py
index c93be66..ebcedbf 100644
--- a/doc/python_api/rst_from_bmesh_opdefines.py
+++ b/doc/python_api/rst_from_bmesh_opdefines.py
@@ -180,8 +180,8 @@ def main():
l = "None,"
b[i] = l
- #for l in b:
- # print(l)
+ # for l in b:
+ # print(l)
text = "\n".join(b)
global_namespace = {
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 7d3f084..f22ac25 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -538,7 +538,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
cls.rolling_shutter_duration = FloatProperty(
name="Rolling Shutter Duration",
description="Scanline \"exposure\" time for the rolling shutter effect",
- default = 0.1,
+ default=0.1,
min=0.0, max=1.0,
)
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index afdca7b..70497b6 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -168,7 +168,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
sub.prop(cscene, "sample_clamp_direct")
sub.prop(cscene, "sample_clamp_indirect")
- if cscene.progressive == 'PATH' or use_branched_path(context) == False:
+ if cscene.progressive == 'PATH' or use_branched_path(context) is False:
col = split.column()
sub = col.column(align=True)
sub.label(text="Samples:")
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index db4c8da..99c46e4 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -69,19 +69,23 @@ def abspath(path, start=None, library=None):
if isinstance(path, bytes):
if path.startswith(b"//"):
if library:
- start = _os.path.dirname(abspath(_getattr_bytes(library, "filepath")))
- return _os.path.join(_os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
- if start is None else start,
- path[2:],
- )
+ start = _os.path.dirname(
+ abspath(_getattr_bytes(library, "filepath")))
+ return _os.path.join(
+ _os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
+ if start is None else start,
+ path[2:],
+ )
else:
if path.startswith("//"):
if library:
- start = _os.path.dirname(abspath(library.filepath))
- return _os.path.join(_os.path.dirname(_bpy.data.filepath)
- if start is None else start,
- path[2:],
- )
+ start = _os.path.dirname(
+ abspath(library.filepath))
+ return _os.path.join(
+ _os.path.dirname(_bpy.data.filepath)
+ if start is None else start,
+ path[2:],
+ )
return path
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index ad774cd..f197596 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -62,11 +62,13 @@ def load_image(imagepath,
:type convert_callback: function
:arg relpath: If not None, make the file relative to this path.
:type relpath: None or string
- :arg check_existing: If true, returns already loaded image datablock if possible
+ :arg check_existing: If true,
+ returns already loaded image datablock if possible
(based on file path).
:type check_existing: bool
- :arg force_reload: If true, force reloading of image (only useful when `check_existing`
- is also enabled).
+ :arg force_reload: If true,
+ force reloading of image (only useful when `check_existing`
+ is also enabled).
:type force_reload: bool
:return: an image or None
:rtype: :class:`bpy.types.Image`
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 65ccc3f..a7ecd0b 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -137,7 +137,8 @@ def orientation_helper_factory(name, axis_forward='Y', axis_up='Z'):
def _update_axis_forward(self, context):
if self.axis_forward[-1] == self.axis_up[-1]:
- self.axis_up = self.axis_up[0:-1] + 'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3]
+ self.axis_up = (self.axis_up[0:-1] +
+ 'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3])
members['axis_forward'] = EnumProperty(
name="Forward",
@@ -154,7 +155,8 @@ def orientation_helper_factory(name, axis_forward='Y', axis_up='Z'):
def _update_axis_up(self, context):
if self.axis_up[-1] == self.axis_forward[-1]:
- self.axis_forward = self.axis_forward[0:-1] + 'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3]
+ self.axis_forward = (self.axis_forward[0:-1] +
+ 'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3])
members['axis_up'] = EnumProperty(
name="Up",
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 830db97..e21b34a 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -208,7 +208,7 @@ class _GenericBone:
@property
def basename(self):
"""The name of this bone before any '.' character"""
- #return self.name.rsplit(".", 1)[0]
+ # return self.name.rsplit(".", 1)[0]
return self.name.split(".")[0]
@property
diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py
index 382cb18..49395dd 100644
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@ -40,7 +40,6 @@ def write_sysinfo(filepath):
r = r[1:-1]
return r
-
output = open(filepath, 'w', encoding="utf-8")
header = "= Blender %s System Information =\n" % bpy.app.version_string
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 7ade444..ef0fc9c 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -440,7 +440,7 @@ class ConstraintButtonsPanel:
self.space_template(layout, con)
- #def SCRIPT(self, context, layout, con):
+ # def SCRIPT(self, context, layout, con):
def ACTION(self, context, layout, con):
self.target_template(layout, con)
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 98570ca..f26147e 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -293,7 +293,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row = col.split(percentage=0.75)
row.prop(md, "use_symmetry")
row.prop(md, "symmetry_axis", text="")
-
elif decimate_type == 'UNSUBDIV':
layout.prop(md, "iterations")
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 4793537..90a172e 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -89,7 +89,7 @@ class GreasePencilDrawingToolsPanel:
row.prop(context.tool_settings, "grease_pencil_source", expand=True)
elif context.space_data.type == 'CLIP_EDITOR':
row.prop(context.space_data, "grease_pencil_source", expand
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list