Cleanup: use single quotes for enums

This commit is contained in:
Campbell Barton 2025-01-21 23:50:17 +11:00
parent bca8fc76f9
commit 84c9e6e655
10 changed files with 23 additions and 23 deletions

View file

@ -88,7 +88,7 @@ class WORLD_OT_convert_volume_to_mesh(bpy.types.Operator):
world.use_eevee_finite_volume = False
return {"FINISHED"}
return {'FINISHED'}
@staticmethod
def _world_get(context):

View file

@ -760,7 +760,7 @@ class CompositorPerformanceButtonsPanel:
col = layout.column()
row = col.row()
row.prop(rd, "compositor_device", text="Device", expand=True)
if rd.compositor_device == "GPU":
if rd.compositor_device == 'GPU':
col.prop(rd, "compositor_precision", text="Precision")

View file

@ -1624,9 +1624,9 @@ class CLIP_MT_select_graph(Menu):
def draw(self, _context):
layout = self.layout
layout.operator("clip.graph_select_all_markers", text="All").action = "SELECT"
layout.operator("clip.graph_select_all_markers", text="None").action = "DESELECT"
layout.operator("clip.graph_select_all_markers", text="Invert").action = "INVERT"
layout.operator("clip.graph_select_all_markers", text="All").action = 'SELECT'
layout.operator("clip.graph_select_all_markers", text="None").action = 'DESELECT'
layout.operator("clip.graph_select_all_markers", text="Invert").action = 'INVERT'
class CLIP_MT_tracking_context_menu(Menu):

View file

@ -1726,7 +1726,7 @@ class IMAGE_PT_annotation(AnnotationDataPanel, Panel):
class ImageAssetShelf(BrushAssetShelf):
bl_space_type = "IMAGE_EDITOR"
bl_space_type = 'IMAGE_EDITOR'
class IMAGE_AST_brush_paint(ImageAssetShelf, AssetShelf):

View file

@ -697,7 +697,7 @@ class NODE_PT_active_node_generic(Panel):
layout.prop(node, "name", icon='NODE')
layout.prop(node, "label", icon='NODE')
if tree.type == "GEOMETRY":
if tree.type == 'GEOMETRY':
layout.prop(node, "warning_propagation")
@ -853,7 +853,7 @@ class NODE_PT_quality(bpy.types.Panel):
col = layout.column()
col.prop(rd, "compositor_device", text="Device")
if rd.compositor_device == "GPU":
if rd.compositor_device == 'GPU':
col.prop(rd, "compositor_precision", text="Precision")
col = layout.column()

View file

@ -1136,7 +1136,7 @@ class SEQUENCER_MT_strip(Menu):
layout.menu("SEQUENCER_MT_strip_lock_mute")
layout.separator()
layout.operator("sequencer.connect", icon="LINKED").toggle = True
layout.operator("sequencer.connect", icon='LINKED').toggle = True
layout.operator("sequencer.disconnect")
layout.separator()
@ -1319,7 +1319,7 @@ class SEQUENCER_MT_context_menu(Menu):
layout.menu("SEQUENCER_MT_strip_lock_mute")
layout.separator()
layout.operator("sequencer.connect", icon="LINKED").toggle = True
layout.operator("sequencer.connect", icon='LINKED').toggle = True
layout.operator("sequencer.disconnect")
def draw_retime(self, context):
@ -1771,14 +1771,14 @@ class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_effect_text_outline(SequencerButtonsPanel, Panel):
bl_label = "Outline"
bl_options = {"DEFAULT_CLOSED"}
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
bl_parent_id = "SEQUENCER_PT_effect_text_style"
@classmethod
def poll(cls, context):
strip = context.active_strip
return strip.type == "TEXT"
return strip.type == 'TEXT'
def draw_header(self, context):
strip = context.active_strip
@ -1798,14 +1798,14 @@ class SEQUENCER_PT_effect_text_outline(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_effect_text_shadow(SequencerButtonsPanel, Panel):
bl_label = "Shadow"
bl_options = {"DEFAULT_CLOSED"}
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
bl_parent_id = "SEQUENCER_PT_effect_text_style"
@classmethod
def poll(cls, context):
strip = context.active_strip
return strip.type == "TEXT"
return strip.type == 'TEXT'
def draw_header(self, context):
strip = context.active_strip
@ -1828,14 +1828,14 @@ class SEQUENCER_PT_effect_text_shadow(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_effect_text_box(SequencerButtonsPanel, Panel):
bl_label = "Box"
bl_translation_context = i18n_contexts.id_sequence
bl_options = {"DEFAULT_CLOSED"}
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
bl_parent_id = "SEQUENCER_PT_effect_text_style"
@classmethod
def poll(cls, context):
strip = context.active_strip
return strip.type == "TEXT"
return strip.type == 'TEXT'
def draw_header(self, context):
strip = context.active_strip

View file

@ -2352,10 +2352,10 @@ class _defs_grease_pencil_paint:
row.use_property_split = False
row.prop(props, "mode", expand=True)
if props.mode == "MATERIAL":
if props.mode == 'MATERIAL':
col = layout.column()
col.prop(props, "material_mode")
elif props.mode == "PALETTE":
elif props.mode == 'PALETTE':
tool_settings = context.tool_settings
settings = tool_settings.gpencil_paint

View file

@ -804,7 +804,7 @@ class TOPBAR_PT_grease_pencil_layers(Panel):
object = context.object
if object is None:
return False
if object.type != "GREASEPENCIL":
if object.type != 'GREASEPENCIL':
return False
return True

View file

@ -933,7 +933,7 @@ class USERPREF_PT_viewport_subdivision(ViewportPanel, CenterAlignMixIn, Panel):
def poll(cls, context):
import gpu
backend = gpu.platform.backend_type_get()
return backend == "OPENGL"
return backend == 'OPENGL'
def draw_centered(self, context, layout):
prefs = context.preferences

View file

@ -3370,7 +3370,7 @@ class VIEW3D_MT_object_convert(Menu):
layout = self.layout
ob = context.active_object
if ob and ob.type != "EMPTY":
if ob and ob.type != 'EMPTY':
layout.operator_enum("object.convert", "target")
else:
@ -3623,10 +3623,10 @@ class VIEW3D_MT_sculpt(Menu):
props.action = 'HIDE'
props = layout.operator("paint.visibility_filter", text="Grow Visibility")
props.action = "GROW"
props.action = 'GROW'
props = layout.operator("paint.visibility_filter", text="Shrink Visibility")
props.action = "SHRINK"
props.action = 'SHRINK'
layout.menu("VIEW3D_MT_sculpt_showhide", text="Show/Hide")