From afdec492ceb51e77c2ac38bc584c7c69203c9257 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sun, 29 Jul 2012 12:06:18 +0000
Subject: [PATCH] style cleanup

---
 io_mesh_ply/import_ply.py       |  1 +
 io_scene_3ds/export_3ds.py      |  2 +-
 io_scene_obj/import_obj.py      |  2 +-
 mocap/__init__.py               |  2 +-
 space_view3d_copy_attributes.py |  2 +-
 space_view3d_screencast_keys.py |  7 ++++---
 system_demo_mode/demo_mode.py   |  2 +-
 ui_translate/__init__.py        |  8 ++++----
 ui_translate/utils.py           | 13 ++++++-------
 9 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index 98184307c..f5c96d7bf 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -356,6 +356,7 @@ def load_ply_mesh(filepath, ply_name):
 
     return mesh
 
+
 def load_ply(filepath):
     import time
 
diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py
index 765d5de33..c5b121610 100644
--- a/io_scene_3ds/export_3ds.py
+++ b/io_scene_3ds/export_3ds.py
@@ -41,7 +41,7 @@ KFDATA = 0xB000  # This is the header for all of the key frame info
 
 #------ 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
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 4ab42ee3e..2ce97ec08 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -653,7 +653,7 @@ def create_mesh(new_objects,
         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]]
diff --git a/mocap/__init__.py b/mocap/__init__.py
index e6a00f18e..4cca6b3e6 100644
--- a/mocap/__init__.py
+++ b/mocap/__init__.py
@@ -370,7 +370,7 @@ class MocapConstraintsPanel(bpy.types.Panel):
                         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()
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index 01e359eef..4f090716d 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -32,7 +32,7 @@ bl_info = {
     'category': '3D View'}
 
 import bpy
-from mathutils import Matrix, Vector
+from mathutils import Matrix
 
 
 def build_exec(loopfunc, func):
diff --git a/space_view3d_screencast_keys.py b/space_view3d_screencast_keys.py
index 5ece787bf..1530681cf 100644
--- a/space_view3d_screencast_keys.py
+++ b/space_view3d_screencast_keys.py
@@ -826,13 +826,14 @@ class OBJECT_PT_keys_status(bpy.types.Panel):
 
             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():
diff --git a/system_demo_mode/demo_mode.py b/system_demo_mode/demo_mode.py
index 0d02bcb4f..46c8ba5bd 100644
--- a/system_demo_mode/demo_mode.py
+++ b/system_demo_mode/demo_mode.py
@@ -132,7 +132,7 @@ def demo_mode_auto_select():
 
 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
diff --git a/ui_translate/__init__.py b/ui_translate/__init__.py
index 048ee9db7..26e800c21 100644
--- a/ui_translate/__init__.py
+++ b/ui_translate/__init__.py
@@ -79,7 +79,7 @@ class UI_OT_edittranslation_update_mo(bpy.types.Operator):
     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 @@ class UI_OT_edittranslation(bpy.types.Operator):
     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"):
diff --git a/ui_translate/utils.py b/ui_translate/utils.py
index 2f1988944..79344c896 100644
--- a/ui_translate/utils.py
+++ b/ui_translate/utils.py
@@ -36,7 +36,6 @@ BLF_I18NCONTEXT_DEFAULT = ""
 NUM_BUTTON_SUFFIX = ": "
 
 
-
 # Mo root datapath.
 MO_PATH_ROOT = "locale"
 
@@ -94,7 +93,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
 
     # 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 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
             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 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
     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 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
 
     # 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 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
             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 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
         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:
-- 
GitLab