[Bf-blender-cvs] [ebe7a407d73] master: Cleanup: use static set instead of list

Campbell Barton noreply at git.blender.org
Tue Aug 27 11:21:09 CEST 2019


Commit: ebe7a407d738aba1b7ea508576ec1530db4f1447
Author: Campbell Barton
Date:   Tue Aug 27 19:17:28 2019 +1000
Branches: master
https://developer.blender.org/rBebe7a407d738aba1b7ea508576ec1530db4f1447

Cleanup: use static set instead of list

===================================================================

M	release/scripts/modules/console/complete_import.py
M	release/scripts/startup/bl_ui/space_sequencer.py
M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py
index ff3099d7285..6f51f6b691b 100644
--- a/release/scripts/modules/console/complete_import.py
+++ b/release/scripts/modules/console/complete_import.py
@@ -178,7 +178,7 @@ def complete(line):
     words = line.split(' ')
     if len(words) == 3 and words[0] == 'from':
         return ['import ']
-    if len(words) < 3 and (words[0] in ['import', 'from']):
+    if len(words) < 3 and (words[0] in {'import', 'from'}):
         if len(words) == 1:
             return get_root_modules()
         mod = words[1].split('.')
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index d5f7f0ae498..27c40d7599b 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1880,7 +1880,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
         col = layout.column()
         col.prop(render, "sequencer_gl_preview", text="Preview Shading")
 
-        if render.sequencer_gl_preview in ['SOLID', 'WIREFRAME']:
+        if render.sequencer_gl_preview in {'SOLID', 'WIREFRAME'}:
             col.prop(render, "use_sequencer_override_scene_strip")
 
 
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ae2a2ce3e7c..b71305f96d9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5253,7 +5253,7 @@ class VIEW3D_PT_shading_options(Panel):
 
         if shading.type == 'SOLID':
             col = layout.column()
-            if (shading.light in ['STUDIO', 'MATCAP']):
+            if shading.light in {'STUDIO', 'MATCAP'}:
                 col.active = shading.selected_studio_light.has_specular_highlight_pass
                 col.prop(shading, "show_specular_highlight", text="Specular Lighting")
 
@@ -6389,7 +6389,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
             col.operator("gpencil.stroke_separate", text="Separate").mode = 'STROKE'
 
             col.separator()
-            
+
             col.operator("gpencil.delete", text="Delete Strokes").type = 'STROKES'
 
             col.separator()



More information about the Bf-blender-cvs mailing list