[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3656] trunk/py/scripts/addons: style cleanup

Campbell Barton ideasman42 at gmail.com
Sun Jul 29 14:06:19 CEST 2012


Revision: 3656
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3656
Author:   campbellbarton
Date:     2012-07-29 12:06:18 +0000 (Sun, 29 Jul 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/py/scripts/addons/io_mesh_ply/import_ply.py
    trunk/py/scripts/addons/io_scene_3ds/export_3ds.py
    trunk/py/scripts/addons/io_scene_obj/import_obj.py
    trunk/py/scripts/addons/mocap/__init__.py
    trunk/py/scripts/addons/space_view3d_copy_attributes.py
    trunk/py/scripts/addons/space_view3d_screencast_keys.py
    trunk/py/scripts/addons/system_demo_mode/demo_mode.py
    trunk/py/scripts/addons/ui_translate/__init__.py
    trunk/py/scripts/addons/ui_translate/utils.py

Modified: trunk/py/scripts/addons/io_mesh_ply/import_ply.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_ply/import_ply.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/io_mesh_ply/import_ply.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -356,6 +356,7 @@
 
     return mesh
 
+
 def load_ply(filepath):
     import time
 

Modified: trunk/py/scripts/addons/io_scene_3ds/export_3ds.py
===================================================================
--- trunk/py/scripts/addons/io_scene_3ds/export_3ds.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/io_scene_3ds/export_3ds.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -41,7 +41,7 @@
 
 #------ sub defines of OBJECTINFO
 MATERIAL = 45055  # 0xAFFF // This stored the texture info
-OBJECT = 16384 # 0x4000 // This stores the faces, vertices, etc...
+OBJECT = 16384  # 0x4000 // This stores the faces, vertices, etc...
 
 #>------ sub defines of MATERIAL
 MATNAME = 0xA000  # This holds the material name

Modified: trunk/py/scripts/addons/io_scene_obj/import_obj.py
===================================================================
--- trunk/py/scripts/addons/io_scene_obj/import_obj.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/io_scene_obj/import_obj.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -653,7 +653,7 @@
         bm.from_mesh(me)
         # to avoid slow iterator lookups later / indexing verts is slow in bmesh
         bm_verts = bm.verts[:]
-        
+
         for sharp_edge in sharp_edges.keys():
             vert1 = bm_verts[sharp_edge[0]]
             vert2 = bm_verts[sharp_edge[1]]

Modified: trunk/py/scripts/addons/mocap/__init__.py
===================================================================
--- trunk/py/scripts/addons/mocap/__init__.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/mocap/__init__.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -370,7 +370,7 @@
                         headerRow.operator("mocap.removeconstraint", text="", icon='X', emboss=False).constraint = i
                         if m_constraint.show_expanded:
                             box.separator()
-                            box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA',text="")
+                            box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA', text="")
                             if m_constraint.type == "distance" or m_constraint.type == "point":
                                 box.prop_search(m_constraint, 'constrained_boneB', enduser_obj.pose, "bones", icon='CONSTRAINT_BONE')
                             frameRow = box.row()

Modified: trunk/py/scripts/addons/space_view3d_copy_attributes.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_copy_attributes.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/space_view3d_copy_attributes.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -32,7 +32,7 @@
     'category': '3D View'}
 
 import bpy
-from mathutils import Matrix, Vector
+from mathutils import Matrix
 
 
 def build_exec(loopfunc, func):

Modified: trunk/py/scripts/addons/space_view3d_screencast_keys.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_screencast_keys.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/space_view3d_screencast_keys.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -826,13 +826,14 @@
 
             row = layout.row(align=True)
             row.enabled = sc.screencast_keys_timer_show
-            row.prop(sc,"screencast_keys_timer_size")
+            row.prop(sc, "screencast_keys_timer_size")
             row = layout.row(align=True)
             row.enabled = sc.screencast_keys_timer_show
             row.operator("view3d.screencast_keys_timer_reset", text="Reset")
 
-classes = [ScreencastKeysStatus, ScreencastKeysTimerReset, 
-    OBJECT_PT_keys_status]
+classes = (ScreencastKeysStatus,
+           ScreencastKeysTimerReset,
+           OBJECT_PT_keys_status)
 
 
 def register():

Modified: trunk/py/scripts/addons/system_demo_mode/demo_mode.py
===================================================================
--- trunk/py/scripts/addons/system_demo_mode/demo_mode.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/system_demo_mode/demo_mode.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -132,7 +132,7 @@
 
 def demo_mode_next_file(step=1):
 
-    # support for temp 
+    # support for temp
     if global_config_files[global_state["demo_index"]].get("is_tmp"):
         del global_config_files[global_state["demo_index"]]
         global_state["demo_index"] -= 1

Modified: trunk/py/scripts/addons/ui_translate/__init__.py
===================================================================
--- trunk/py/scripts/addons/ui_translate/__init__.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/ui_translate/__init__.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -79,7 +79,7 @@
     clean_mo = BoolProperty(description="Clean up (remove) all local "
                                         "translation files, to be able to use "
                                         "all system's ones again",
-                            default = False, options={'SKIP_SAVE'})
+                            default=False, options={'SKIP_SAVE'})
 
     def execute(self, context):
         if self.clean_mo:
@@ -140,12 +140,12 @@
     enum_tip_flags = EnumProperty(items=flag_items, description="Flags about the RNA enum item tip of the button", options={'SKIP_SAVE', 'ENUM_FLAG'})
 
     stats_str = StringProperty(description="Stats from opened po", options={'SKIP_SAVE'})
-    update_po = BoolProperty(description="Update po file, try to rebuild mo file, and refresh Blender UI", default = False, options={'SKIP_SAVE'})
-    update_mo = BoolProperty(description="Try to rebuild mo file, and refresh Blender UI (WARNING: you should use a local Blender installation, as you probably have no right to write in the system Blender installation...)", default = False, options={'SKIP_SAVE'})
+    update_po = BoolProperty(description="Update po file, try to rebuild mo file, and refresh Blender UI", default=False, options={'SKIP_SAVE'})
+    update_mo = BoolProperty(description="Try to rebuild mo file, and refresh Blender UI (WARNING: you should use a local Blender installation, as you probably have no right to write in the system Blender installation...)", default=False, options={'SKIP_SAVE'})
     clean_mo = BoolProperty(description="Clean up (remove) all local "
                                         "translation files, to be able to use "
                                         "all system's ones again",
-                            default = False, options={'SKIP_SAVE'})
+                            default=False, options={'SKIP_SAVE'})
 
     def execute(self, context):
         if not hasattr(self, "msgmap"):

Modified: trunk/py/scripts/addons/ui_translate/utils.py
===================================================================
--- trunk/py/scripts/addons/ui_translate/utils.py	2012-07-29 12:05:45 UTC (rev 3655)
+++ trunk/py/scripts/addons/ui_translate/utils.py	2012-07-29 12:06:18 UTC (rev 3656)
@@ -36,7 +36,6 @@
 NUM_BUTTON_SUFFIX = ": "
 
 
-
 # Mo root datapath.
 MO_PATH_ROOT = "locale"
 
@@ -94,7 +93,7 @@
 
     # Labels.
     elbl = getattr(obj, msgmap["enum_label"]["msgstr"])
-    print("enum label: '"+elbl+"'")
+    print("enum label: %r" % elbl)
     if elbl:
         # Enum items' labels have no i18n context...
         k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
@@ -109,7 +108,7 @@
             k &= src_to_msg[src_enum]
         msgmap["enum_label"]["key"] = k
     rlbl = getattr(obj, msgmap["rna_label"]["msgstr"])
-    print("rna label: '"+rlbl+"'", rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
+    print("rna label: %r" % rlbl, rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
     if rlbl:
         k = ctxt_to_msg[rna_ctxt].copy()
         if k and rlbl in msgid_to_msg:
@@ -127,7 +126,7 @@
     if blbl.endswith(NUM_BUTTON_SUFFIX):
         # Num buttons report their label with a trailing ': '...
         blbls.append(blbl[:-len(NUM_BUTTON_SUFFIX)])
-    print("button label: '"+blbl+"'")
+    print("button label: %r" % blbl)
     if blbl and elbl not in blbls and (rlbl not in blbls or rna_ctxt != BLF_I18NCONTEXT_DEFAULT):
         # Always Default context for button label :/
         k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
@@ -149,7 +148,7 @@
 
     # Tips (they never have a specific context).
     etip = getattr(obj, msgmap["enum_tip"]["msgstr"])
-    print("enum tip: '"+etip+"'")
+    print("enum tip: %r" % etip)
     if etip:
         k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
         if etip in msgid_to_msg:
@@ -163,7 +162,7 @@
             k &= src_to_msg[src_enum]
         msgmap["enum_tip"]["key"] = k
     rtip = getattr(obj, msgmap["rna_tip"]["msgstr"])
-    print("rna tip: '"+rtip+"'")
+    print("rna tip: %r" % rtip )
     if rtip:
         k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
         if k and rtip in msgid_to_msg:
@@ -178,7 +177,7 @@
         msgmap["rna_tip"]["key"] = k
         print(k)
     btip = getattr(obj, msgmap["but_tip"]["msgstr"])
-    print("button tip: '"+btip+"'")
+    print("button tip: %r" % btip)
     if btip and btip not in {rtip, etip}:
         k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
         if btip in msgid_to_msg:



More information about the Bf-extensions-cvs mailing list