Cleanup: consistent quotes in Python

This commit is contained in:
Campbell Barton
2024-03-14 10:38:16 +11:00
parent a654e0dde3
commit cf1ab3ec6e
8 changed files with 24 additions and 26 deletions
+5 -5
View File
@@ -289,11 +289,11 @@ class NLA_OT_bake(Operator):
else:
objects = context.selected_editable_objects
if bake_options.do_pose and not bake_options.do_object:
pose_object = getattr(context, 'pose_object', None)
pose_object = getattr(context, "pose_object", None)
if pose_object and pose_object not in objects:
# The active object might not be selected, but it is the one in pose mode.
# It can be assumed this pose needs baking.
objects.append(context.pose_object)
objects.append(pose_object)
objects = [obj for obj in objects if obj.pose is not None]
object_action_pairs = (
@@ -459,8 +459,8 @@ class ARMATURE_OT_copy_bone_color_to_selected(Operator):
bl_options = {'REGISTER', 'UNDO'}
_bone_type_enum = [
('EDIT', 'Bone', 'Copy Bone colors from the active bone to all selected bones'),
('POSE', 'Pose Bone', 'Copy Pose Bone colors from the active pose bone to all selected pose bones'),
('EDIT', "Bone", "Copy Bone colors from the active bone to all selected bones"),
('POSE', "Pose Bone", "Copy Pose Bone colors from the active pose bone to all selected pose bones"),
]
bone_type: EnumProperty(
@@ -648,7 +648,7 @@ class ARMATURE_OT_collection_remove_unused(Operator):
for bcoll in reversed(list(bcolls_to_remove)):
armature.collections.remove(bcoll)
self.report({'INFO'}, 'Removed %d of %d bone collections' %
self.report({'INFO'}, "Removed %d of %d bone collections" %
(num_bcolls_to_remove, num_bcolls_before_removal))
+8 -8
View File
@@ -115,13 +115,13 @@ class WM_OT_previews_batch_generate(Operator):
"--",
])
if not self.use_scenes:
cmd.append('--no_scenes')
cmd.append("--no_scenes")
if not self.use_collections:
cmd.append('--no_collections')
cmd.append("--no_collections")
if not self.use_objects:
cmd.append('--no_objects')
cmd.append("--no_objects")
if not self.use_intern_data:
cmd.append('--no_data_intern')
cmd.append("--no_data_intern")
if not self.use_backups:
cmd.append("--no_backups")
if subprocess.call(cmd):
@@ -225,13 +225,13 @@ class WM_OT_previews_batch_clear(Operator):
"--clear",
])
if not self.use_scenes:
cmd.append('--no_scenes')
cmd.append("--no_scenes")
if not self.use_collections:
cmd.append('--no_collections')
cmd.append("--no_collections")
if not self.use_objects:
cmd.append('--no_objects')
cmd.append("--no_objects")
if not self.use_intern_data:
cmd.append('--no_data_intern')
cmd.append("--no_data_intern")
if not self.use_backups:
cmd.append("--no_backups")
if subprocess.call(cmd):
@@ -301,7 +301,7 @@ class QuickExplode(ObjectModeOperator, Operator):
settings.normal_factor = self.velocity
settings.render_type = 'NONE'
explode = obj.modifiers.new(name='Explode', type='EXPLODE')
explode = obj.modifiers.new(name="Explode", type='EXPLODE')
explode.use_edge_cut = True
if self.fade:
+5 -7
View File
@@ -180,7 +180,7 @@ class CLIP_HT_header(Header):
row = layout.row(align=True)
icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
row.operator("clip.lock_selection_toggle", icon=icon, text="", depress=sc.lock_selection)
row.popover(panel='CLIP_PT_display')
row.popover(panel="CLIP_PT_display")
elif sc.view == 'GRAPH':
row = layout.row(align=True)
@@ -243,11 +243,11 @@ class CLIP_HT_header(Header):
row = layout.row()
row.template_ID(sc, "mask", new="mask.new")
row.popover(panel='CLIP_PT_mask_display')
row.popover(panel="CLIP_PT_mask_display")
row = layout.row(align=True)
icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
row.operator("clip.lock_selection_toggle", icon=icon, text="", depress=sc.lock_selection)
row.popover(panel='CLIP_PT_display')
row.popover(panel="CLIP_PT_display")
def draw(self, context):
layout = self.layout
@@ -1054,8 +1054,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
sub.operator("clip.stabilize_2d_add", icon='ADD', text="")
sub.operator("clip.stabilize_2d_remove", icon='REMOVE', text="")
sub.menu('CLIP_MT_stabilize_2d_context_menu', text="",
icon='DOWNARROW_HLT')
sub.menu("CLIP_MT_stabilize_2d_context_menu", text="", icon='DOWNARROW_HLT')
# Usually we don't hide things from interface, but here every pixel of
# vertical space is precious.
@@ -1071,8 +1070,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
sub.operator("clip.stabilize_2d_rotation_add", icon='ADD', text="")
sub.operator("clip.stabilize_2d_rotation_remove", icon='REMOVE', text="")
sub.menu('CLIP_MT_stabilize_2d_rotation_context_menu', text="",
icon='DOWNARROW_HLT')
sub.menu("CLIP_MT_stabilize_2d_rotation_context_menu", text="", icon='DOWNARROW_HLT')
col = layout.column()
col.prop(stab, "use_autoscale")
+1 -1
View File
@@ -906,7 +906,7 @@ class IMAGE_HT_header(Header):
row.prop(sima, "show_stereo_3d", text="")
if show_maskedit:
row = layout.row()
row.popover(panel='IMAGE_PT_mask_display')
row.popover(panel="IMAGE_PT_mask_display")
# layers.
layout.template_image_layers(ima, iuser)
+2 -2
View File
@@ -407,7 +407,7 @@ class NODE_PT_material_slots(Panel):
iface_("Slot")
)
# Duplicate part of 'EEVEE_MATERIAL_PT_context_material'.
# Duplicate part of `EEVEE_MATERIAL_PT_context_material`.
def draw(self, context):
layout = self.layout
row = layout.row()
@@ -933,7 +933,7 @@ class NODE_PT_node_tree_interface(Panel):
if 'OUTPUT' in active_item.in_out:
layout.prop(active_item, "attribute_domain")
layout.prop(active_item, "default_attribute_name")
if hasattr(active_item, 'draw'):
if hasattr(active_item, "draw"):
active_item.draw(context, layout)
if active_item.item_type == 'PANEL':
+1 -1
View File
@@ -190,7 +190,7 @@ def marker_menu_generic(layout, context):
layout.separator()
layout.menu('NLA_MT_marker_select')
layout.menu("NLA_MT_marker_select")
layout.separator()
+1 -1
View File
@@ -460,7 +460,7 @@ class _draw_tool_settings_context_mode:
if (tool is None) or (not tool.has_datablock):
return False
# See: 'VIEW3D_PT_tools_brush', basically a duplicate
# See: `VIEW3D_PT_tools_brush`, basically a duplicate
tool_settings = context.tool_settings
settings = tool_settings.particle_edit
brush = settings.brush