diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-26 19:39:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-26 19:39:15 +0400 |
commit | 8a423f59ea123948383f024695bf058213169d82 (patch) | |
tree | 9ea31963eb9921ac66838ea3724732a8aa05c3c9 /release/scripts/startup | |
parent | dc19877a09e307b91378565cca6e42aca6f68d9e (diff) |
pep8 cleanup and fix for keymap test operator from my own recent fix.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_operators/console.py | 13 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/view3d.py | 21 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 6 |
4 files changed, 31 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py index de953630f00..109ca758ea8 100644 --- a/release/scripts/startup/bl_operators/console.py +++ b/release/scripts/startup/bl_operators/console.py @@ -37,12 +37,14 @@ class ConsoleExec(Operator): if execute: return execute(context) else: - print("Error: bpy.ops.console.execute_" + sc.language + " - not found") + print("Error: bpy.ops.console.execute_%s - not found" % + sc.language) return {'FINISHED'} class ConsoleAutocomplete(Operator): - '''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one''' + """Evaluate the namespace up until the cursor and give a list of """ \ + """options or complete the name if there is only one""" bl_idname = "console.autocomplete" bl_label = "Console Autocomplete" @@ -54,7 +56,8 @@ class ConsoleAutocomplete(Operator): if autocomplete: return autocomplete(context) else: - print("Error: bpy.ops.console.autocomplete_" + sc.language + " - not found") + print("Error: bpy.ops.console.autocomplete_%s - not found" % + sc.language) return {'FINISHED'} @@ -76,7 +79,8 @@ class ConsoleBanner(Operator): if banner: return banner(context) else: - print("Error: bpy.ops.console.banner_" + sc.language + " - not found") + print("Error: bpy.ops.console.banner_%s - not found" % + sc.language) return {'FINISHED'} @@ -103,4 +107,3 @@ class ConsoleLanguage(Operator): remove_duplicates=True) return {'FINISHED'} - diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py index 805f2b5105b..05b53219119 100644 --- a/release/scripts/startup/bl_operators/view3d.py +++ b/release/scripts/startup/bl_operators/view3d.py @@ -36,7 +36,10 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator): # totvert = mesh.total_vert_sel if select_mode[2] and totface == 1: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)}) + bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', + TRANSFORM_OT_translate={ + "constraint_orientation": 'NORMAL', + "constraint_axis": (False, False, True)}) elif select_mode[2] and totface > 1: bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN') elif select_mode[1] and totedge >= 1: @@ -44,7 +47,8 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator): else: bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN') - # ignore return from operators above because they are 'RUNNING_MODAL', and cause this one not to be freed. [#24671] + # ignore return from operators above because they are 'RUNNING_MODAL', + # and cause this one not to be freed. [#24671] return {'FINISHED'} def invoke(self, context, event): @@ -64,13 +68,20 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator): # totvert = mesh.total_vert_sel if totface >= 1: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (False, False, True)}) + bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', + TRANSFORM_OT_translate={ + "constraint_orientation": 'NORMAL', + "constraint_axis": (False, False, True)}) elif totedge == 1: - bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": 'NORMAL', "constraint_axis": (True, True, False)}) + bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', + TRANSFORM_OT_translate={ + "constraint_orientation": 'NORMAL', + "constraint_axis": (True, True, False)}) else: bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN') - # ignore return from operators above because they are 'RUNNING_MODAL', and cause this one not to be freed. [#24671] + # ignore return from operators above because they are 'RUNNING_MODAL', + # and cause this one not to be freed. [#24671] return {'FINISHED'} def invoke(self, context, event): diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 72efdeeb5b3..85e79914ce3 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1180,7 +1180,7 @@ class WM_OT_copy_prev_settings(Operator): return {'CANCELLED'} - + class WM_OT_keyconfig_test(Operator): "Test keyconfig for conflicts" bl_idname = "wm.keyconfig_test" @@ -1447,8 +1447,8 @@ class WM_OT_operator_cheat_sheet(Operator): textblock.write('\n'.join(op_strings)) self.report({'INFO'}, "See OperatorList.txt textblock") return {'FINISHED'} - - + + class WM_OT_addon_enable(Operator): "Enable an addon" bl_idname = "wm.addon_enable" diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index d0a3a53aa85..c3b2e30cb12 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -66,9 +66,11 @@ class TEXT_HT_header(Header): row = layout.row() if text.filepath: if text.is_dirty: - row.label(text="File" + ": *%r " % text.filepath + "(unsaved)") + row.label(text="File" + ": *%r " % + text.filepath + "(unsaved)") else: - row.label(text="File" + ": %r" % text.filepath) + row.label(text="File" + ": %r" % + text.filepath) else: row.label(text="Text: External" if text.library |