Cleanup: python quotes
authorCampbell Barton <ideasman42@gmail.com>
Tue, 18 Dec 2018 04:01:03 +0000 (15:01 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 18 Dec 2018 04:02:49 +0000 (15:02 +1100)
release/scripts/startup/bl_operators/add_mesh_torus.py
release/scripts/startup/bl_operators/file.py
release/scripts/startup/bl_ui/properties_constraint.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py

index c4fd60140b5b86716f75830453313c70d3d31667..7d30b4e9ce0a05820eff03ac9a58891f8d04e686 100644 (file)
@@ -200,9 +200,9 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
         layout = self.layout
 
         col = layout.column(align=True)
-        col.prop(self, 'generate_uvs')
+        col.prop(self, "generate_uvs")
         col.separator()
-        col.prop(self, 'view_align')
+        col.prop(self, "view_align")
 
         col = layout.column(align=True)
         col.label(text="Location")
index 44948879fe62668c368cc519931df5771b268c6b..c00c4214ebc6c5e5ceef931115804a47a80b91d2 100644 (file)
@@ -264,12 +264,12 @@ class WM_OT_blend_strings_utf8_validate(Operator):
             return False
         done_items.add(item)
 
-        if getattr(item, 'library', None) is not None:
+        if getattr(item, "library", None) is not None:
             return False  # No point in checking library data, we cannot fix it anyway...
 
         changed = False
         for prop in item.bl_rna.properties:
-            if prop.identifier in {'bl_rna', 'rna_type'}:
+            if prop.identifier in {"bl_rna", "rna_type"}:
                 continue  # Or we'd recurse 'till Hell freezes.
             if prop.is_readonly:
                 continue
index b1f2c43c933134afbe68585e432fcc7525882965..144e1dc2af69136f8c5b6db8f4ea7f30a6c5f48b 100644 (file)
@@ -749,7 +749,7 @@ class ConstraintButtonsPanel:
         layout.prop(con, "shrinkwrap_type")
 
         if con.shrinkwrap_type in {'PROJECT', 'NEAREST_SURFACE', 'TARGET_PROJECT'}:
-            layout.prop(con, 'wrap_mode', text="Snap Mode")
+            layout.prop(con, "wrap_mode", text="Snap Mode")
 
         if con.shrinkwrap_type == 'PROJECT':
             row = layout.row(align=True)
index 10983d1faaa2c6a6ee9b8991a715d2b4943e8022..425681fc19a5a3fd47d91f9e514143b5483e9758 100644 (file)
@@ -177,7 +177,7 @@ class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
     def poll(cls, context):
         node = context.texture_node
         # TODO(sergey): perform a faster/nicer check?
-        return node and hasattr(node, 'texture_mapping') and (context.engine in cls.COMPAT_ENGINES)
+        return node and hasattr(node, "texture_mapping") and (context.engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
index efbccc33c1bbf80dccc60044000f52276edc8c42..88bfa8a2e248b475031cee259a5ce10158a76a33 100644 (file)
@@ -45,9 +45,9 @@ class USERPREF_HT_header(Header):
             layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
             layout.menu("USERPREF_MT_addons_online_resources")
         elif userpref.active_section == 'LIGHTS':
-            layout.operator('wm.studiolight_install', text="Add MatCap").type = 'MATCAP'
-            layout.operator('wm.studiolight_install', text="Add LookDev HDRI").type = 'WORLD'
-            op = layout.operator('wm.studiolight_install', text="Add Studio Light")
+            layout.operator("wm.studiolight_install", text="Add MatCap").type = 'MATCAP'
+            layout.operator("wm.studiolight_install", text="Add LookDev HDRI").type = 'WORLD'
+            op = layout.operator("wm.studiolight_install", text="Add Studio Light")
             op.type = 'STUDIO'
             op.filter_glob = ".sl"
         elif userpref.active_section == 'THEMES':
@@ -1521,11 +1521,11 @@ class StudioLightPanelMixin():
 
         row.template_icon(layout.icon(studio_light), scale=6.0)
         col = row.column()
-        op = col.operator('wm.studiolight_uninstall', text="", icon='REMOVE')
+        op = col.operator("wm.studiolight_uninstall", text="", icon='REMOVE')
         op.index = studio_light.index
 
         if studio_light.type == 'STUDIO':
-            op = col.operator('wm.studiolight_copy_settings', text="", icon='IMPORT')
+            op = col.operator("wm.studiolight_copy_settings", text="", icon='IMPORT')
             op.index = studio_light.index
 
         box.label(text=studio_light.name)
@@ -1571,7 +1571,7 @@ class USERPREF_PT_studiolight_light_editor(Panel):
 
         row = layout.row()
         row.prop(system, "edit_studio_light", toggle=True)
-        row.operator('wm.studiolight_new', text="Save as Studio light", icon="FILE_TICK")
+        row.operator("wm.studiolight_new", text="Save as Studio light", icon="FILE_TICK")
 
         layout.separator()
 
index bfba36f255bb8ec7f935a84a78847abd33b0ca3d..de1502375cf0991721d94eed36484bfa856aa168 100644 (file)
@@ -161,7 +161,7 @@ class VIEW3D_HT_header(Header):
                         show_snap = True
 
         if show_snap:
-            snap_items = bpy.types.ToolSettings.bl_rna.properties['snap_elements'].enum_items
+            snap_items = bpy.types.ToolSettings.bl_rna.properties["snap_elements"].enum_items
             snap_elements = tool_settings.snap_elements
             if len(snap_elements) == 1:
                 text = ""
@@ -229,7 +229,7 @@ class VIEW3D_HT_header(Header):
         # grease pencil
         if object_mode == 'PAINT_GPENCIL':
             origin = tool_settings.gpencil_stroke_placement_view3d
-            gp_origin = tool_settings.bl_rna.properties['gpencil_stroke_placement_view3d'].enum_items[origin]
+            gp_origin = tool_settings.bl_rna.properties["gpencil_stroke_placement_view3d"].enum_items[origin]
 
             or_icon = getattr(gp_origin, "icon", "BLANK1")
             or_name = getattr(gp_origin, "name", "Stroke Placement")
@@ -4024,7 +4024,7 @@ class VIEW3D_MT_object_mode_pie(Menu):
         layout = self.layout
 
         pie = layout.menu_pie()
-        pie.operator_enum("OBJECT_OT_mode_set", "mode")
+        pie.operator_enum("object.mode_set", "mode")
 
 
 class VIEW3D_MT_view_pie(Menu):
@@ -4035,7 +4035,7 @@ class VIEW3D_MT_view_pie(Menu):
         layout = self.layout
 
         pie = layout.menu_pie()
-        pie.operator_enum("VIEW3D_OT_view_axis", "type")
+        pie.operator_enum("view3d.view_axis", "type")
         pie.operator("view3d.view_camera", text="View Camera", icon='CAMERA_DATA')
         pie.operator("view3d.view_selected", text="View Selected", icon='ZOOM_SELECTED')
 
@@ -4067,7 +4067,7 @@ class VIEW3D_MT_shading_ex_pie(Menu):
         pie.prop_enum(view.shading, "type", value='WIREFRAME')
         pie.prop_enum(view.shading, "type", value='SOLID')
 
-        # Note this duplicates 'view3d.toggle_xray' logic, so we can see the active item: T58661.
+        # Note this duplicates "view3d.toggle_xray" logic, so we can see the active item: T58661.
         if (
                 (context.mode == 'POSE') or
                 ((context.mode == 'WEIGHT_PAINT') and (context.active_object.find_armature()))
@@ -4422,7 +4422,7 @@ class VIEW3D_PT_shading_lighting(Panel):
                     sub.prop(system, "edit_studio_light", text="Disable Studio Light Edit", icon="NONE", toggle=True)
 
                 col = split.column()
-                col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES')
+                col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
 
                 split = layout.split(factor=0.9)
                 col = split.column()
@@ -4440,8 +4440,8 @@ class VIEW3D_PT_shading_lighting(Panel):
                 sub.template_icon_view(shading, "studio_light", scale=3)
 
                 col = split.column()
-                col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES')
-                col.operator('VIEW3D_OT_toggle_matcap_flip', emboss=False, text="", icon='ARROW_LEFTRIGHT')
+                col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
+                col.operator("view3d.toggle_matcap_flip", emboss=False, text="", icon='ARROW_LEFTRIGHT')
 
         elif shading.type == 'MATERIAL':
             col.prop(shading, "use_scene_lights")
@@ -4457,7 +4457,7 @@ class VIEW3D_PT_shading_lighting(Panel):
                 sub.template_icon_view(shading, "studio_light", scale=3)
 
                 col = split.column()
-                col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES')
+                col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
 
                 if shading.selected_studio_light.type == 'WORLD':
                     split = layout.split(factor=0.9)
@@ -4482,16 +4482,16 @@ class VIEW3D_PT_shading_color(Panel):
         layout = self.layout
         shading = VIEW3D_PT_shading.get_shading(context)
 
-        layout.row().prop(shading, 'color_type', expand=True)
+        layout.row().prop(shading, "color_type", expand=True)
         if shading.color_type == 'SINGLE':
-            layout.row().prop(shading, 'single_color', text="")
+            layout.row().prop(shading, "single_color", text="")
 
     def _draw_background_color(self, context):
         layout = self.layout
         shading = VIEW3D_PT_shading.get_shading(context)
 
         layout.row().label(text="Background")
-        layout.row().prop(shading, 'background_type', expand=True)
+        layout.row().prop(shading, "background_type", expand=True)
         if shading.background_type == 'VIEWPORT':
             layout.row().prop(shading, "background_color", text="")