From 84c9e6e65514f707097c6189d8eb89406b77d291 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Jan 2025 23:50:17 +1100 Subject: [PATCH] Cleanup: use single quotes for enums --- scripts/startup/bl_operators/world.py | 2 +- scripts/startup/bl_ui/properties_render.py | 2 +- scripts/startup/bl_ui/space_clip.py | 6 +++--- scripts/startup/bl_ui/space_image.py | 2 +- scripts/startup/bl_ui/space_node.py | 4 ++-- scripts/startup/bl_ui/space_sequencer.py | 16 ++++++++-------- .../startup/bl_ui/space_toolsystem_toolbar.py | 4 ++-- scripts/startup/bl_ui/space_topbar.py | 2 +- scripts/startup/bl_ui/space_userpref.py | 2 +- scripts/startup/bl_ui/space_view3d.py | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/startup/bl_operators/world.py b/scripts/startup/bl_operators/world.py index b27190fa943..48528dff2a8 100644 --- a/scripts/startup/bl_operators/world.py +++ b/scripts/startup/bl_operators/world.py @@ -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): diff --git a/scripts/startup/bl_ui/properties_render.py b/scripts/startup/bl_ui/properties_render.py index b687c7950d1..a4ade4ce098 100644 --- a/scripts/startup/bl_ui/properties_render.py +++ b/scripts/startup/bl_ui/properties_render.py @@ -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") diff --git a/scripts/startup/bl_ui/space_clip.py b/scripts/startup/bl_ui/space_clip.py index fdb4e6606f4..a42f657b11a 100644 --- a/scripts/startup/bl_ui/space_clip.py +++ b/scripts/startup/bl_ui/space_clip.py @@ -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): diff --git a/scripts/startup/bl_ui/space_image.py b/scripts/startup/bl_ui/space_image.py index 6f90ac10723..43542507f42 100644 --- a/scripts/startup/bl_ui/space_image.py +++ b/scripts/startup/bl_ui/space_image.py @@ -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): diff --git a/scripts/startup/bl_ui/space_node.py b/scripts/startup/bl_ui/space_node.py index 458e118faf7..c385825eeca 100644 --- a/scripts/startup/bl_ui/space_node.py +++ b/scripts/startup/bl_ui/space_node.py @@ -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() diff --git a/scripts/startup/bl_ui/space_sequencer.py b/scripts/startup/bl_ui/space_sequencer.py index f0bb65f8d73..be79b620195 100644 --- a/scripts/startup/bl_ui/space_sequencer.py +++ b/scripts/startup/bl_ui/space_sequencer.py @@ -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 diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 97631704651..6e179105f1c 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -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 diff --git a/scripts/startup/bl_ui/space_topbar.py b/scripts/startup/bl_ui/space_topbar.py index 31855ba8e72..4c3de21176b 100644 --- a/scripts/startup/bl_ui/space_topbar.py +++ b/scripts/startup/bl_ui/space_topbar.py @@ -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 diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index 804c469f90e..6569fafe6b2 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -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 diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index cccacc2d5c6..0c1f183d068 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -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")