[Bf-blender-cvs] [0e0e528] master: Cleanup: pep8
Campbell Barton
noreply at git.blender.org
Wed Sep 17 10:39:27 CEST 2014
Commit: 0e0e528ea4f9529a549ab50a6a2da7a3187258a8
Author: Campbell Barton
Date: Wed Sep 17 18:36:17 2014 +1000
Branches: master
https://developer.blender.org/rB0e0e528ea4f9529a549ab50a6a2da7a3187258a8
Cleanup: pep8
===================================================================
M doc/python_api/examples/bpy.props.5.py
M doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
M doc/python_api/sphinx_doc_gen.py
M doc/python_api/sphinx_doc_gen_monkeypatch.py
M intern/cycles/blender/addon/__init__.py
M intern/cycles/blender/addon/ui.py
M release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
M release/scripts/modules/bl_i18n_utils/utils.py
M release/scripts/modules/bpy_types.py
M release/scripts/modules/rna_xml.py
M release/scripts/startup/bl_operators/__init__.py
M release/scripts/startup/bl_operators/anim.py
M release/scripts/startup/bl_operators/object_quick_effects.py
M release/scripts/startup/bl_operators/wm.py
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M release/scripts/startup/bl_ui/properties_object.py
M release/scripts/startup/bl_ui/properties_paint_common.py
M release/scripts/startup/bl_ui/space_clip.py
M release/scripts/startup/bl_ui/space_sequencer.py
M release/scripts/startup/bl_ui/space_userpref.py
M release/scripts/startup/bl_ui/space_view3d.py
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
M release/scripts/templates_py/operator_modal_view3d_raycast.py
M release/scripts/templates_py/script_stub.py
M release/scripts/templates_py/ui_pie_menu.py
M source/blender/python/rna_dump.py
M tests/python/bl_mesh_modifiers.py
===================================================================
diff --git a/doc/python_api/examples/bpy.props.5.py b/doc/python_api/examples/bpy.props.5.py
index d2ace54..4e9d61d 100644
--- a/doc/python_api/examples/bpy.props.5.py
+++ b/doc/python_api/examples/bpy.props.5.py
@@ -75,7 +75,7 @@ print(scene.test_float)
scene.test_array = (True, False)
print([x for x in scene.test_array])
-#scene.test_date = "blah" # this would fail, property is read-only
+# scene.test_date = "blah" # this would fail, property is read-only
print(scene.test_date)
scene.test_enum = 'BLUE'
diff --git a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
index 05163b3..a83b23e 100644
--- a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
+++ b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
@@ -8,4 +8,3 @@ collection.foreach_get(attr, some_seq)
# Python equivalent
for i in range(len(seq)):
some_seq[i] = getattr(collection[i], attr)
-
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 98bf6bf..9ec8f9a 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1,22 +1,22 @@
- # ***** BEGIN GPL LICENSE BLOCK *****
- #
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License
- # as published by the Free Software Foundation; either version 2
- # of the License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software Foundation,
- # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- #
- # Contributor(s): Campbell Barton, Luca Bonavita
- #
- # #**** END GPL LICENSE BLOCK #****
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributor(s): Campbell Barton
+#
+# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
diff --git a/doc/python_api/sphinx_doc_gen_monkeypatch.py b/doc/python_api/sphinx_doc_gen_monkeypatch.py
index 1167ece..9fdbf61 100644
--- a/doc/python_api/sphinx_doc_gen_monkeypatch.py
+++ b/doc/python_api/sphinx_doc_gen_monkeypatch.py
@@ -1,22 +1,22 @@
- # ***** BEGIN GPL LICENSE BLOCK *****
- #
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License
- # as published by the Free Software Foundation; either version 2
- # of the License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software Foundation,
- # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- #
- # Contributor(s): Campbell Barton
- #
- # #**** END GPL LICENSE BLOCK #****
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributor(s): Campbell Barton
+#
+# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py
index d1d27df..8c60ea3 100644
--- a/intern/cycles/blender/addon/__init__.py
+++ b/intern/cycles/blender/addon/__init__.py
@@ -33,6 +33,7 @@ import bpy
from . import engine
from . import version_update
+
class CyclesRender(bpy.types.RenderEngine):
bl_idname = 'CYCLES'
bl_label = "Cycles Render"
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 6e40c42..9632b12 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -567,7 +567,7 @@ class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
layout = self.layout
rd = context.scene.render
- scene = context.scene
+ # scene = context.scene
layout.active = rd.use_motion_blur
@@ -580,7 +580,7 @@ class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
layout = self.layout
rd = context.scene.render
- scene = context.scene
+ # scene = context.scene
ob = context.object
cob = ob.cycles
@@ -982,7 +982,7 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
layout = self.layout
mat = context.material
- cmat = mat.cycles
+ # cmat = mat.cycles
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
@@ -1209,7 +1209,6 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- scene = context.scene
psys = context.particle_system
return CyclesButtonsPanel.poll(context) and psys and psys.settings.type == 'HAIR'
@@ -1284,7 +1283,7 @@ class CyclesRender_PT_bake(CyclesButtonsPanel, Panel):
box.prop(cbk, "normal_space", text="Space")
row = box.row(align=True)
- row.label(text = "Swizzle:")
+ row.label(text="Swizzle:")
row.prop(cbk, "normal_r", text="")
row.prop(cbk, "normal_g", text="")
row.prop(cbk, "normal_b", text="")
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index ad2a70b..8874ecc 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -343,10 +343,10 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings)
# Panels' "tabs" system.
- if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category:
+ if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category:
process_msg(msgs, default_context, bl_rna.bl_category, msgsrc, reports, check_ctxt_rna, settings)
- if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label:
+ if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label:
process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings)
walk_properties(cls)
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 8597764..911e176 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -1343,7 +1343,7 @@ class I18n:
#key = self.settings.PO_HEADER_KEY
#for uid, trans in self.trans.items():
#if key not in trans.msgs:
- #trans.msgs[key]
+ #trans.msgs[key]
self.unescape()
def write(self, kind, langs=set()):
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index bc2e936..e197663 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -694,7 +694,7 @@ class _GenericUI:
draw_funcs = cls._dyn_ui_initialize()
try:
draw_funcs.remove(draw_func)
- except:
+ except ValueError:
pass
diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py
index 9776993..41f890d 100644
--- a/release/scripts/modules/rna_xml.py
+++ b/release/scripts/modules/rna_xml.py
@@ -92,7 +92,6 @@ def rna2xml(fw=print_ln,
bpy.types.Sequence,
)
-
def number_to_str(val, val_type):
if val_type == int:
return "%d" % val
@@ -245,13 +244,13 @@ def xml2rna(root_xml,
):
def rna2xml_node(xml_node, value):
-# print("evaluating:", xml_node.nodeName)
+ # print("evaluating:", xml_node.nodeName)
# ---------------------------------------------------------------------
# Simple attributes
for attr in xml_node.attributes.keys():
-# print(" ", attr)
+ # print(" ", attr)
subvalue = getattr(value, attr, Ellipsis)
if subvalue is Ellipsis:
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py
index 4f6863a..e44fce6 100644
--- a/release/scripts/startup/bl_operators/__init__.py
+++ b/release/scripts/startup/bl_operators/__init__.py
@@ -9,7 +9,7 @@
# but WITHOUT ANY WARR
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list