Cleanup: redundant set/tuple use for comparison

This commit is contained in:
Campbell Barton 2019-06-22 13:52:05 +10:00
parent f148c5613d
commit a1f74409ea
4 changed files with 5 additions and 5 deletions

View File

@ -853,7 +853,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
def invoke(self, context, event):
engine = context.scene.render.engine
if engine not in {'CYCLES', 'BLENDER_EEVEE'}:
if engine not in {'BLENDER_WORKBENCH'}:
if engine != 'BLENDER_WORKBENCH':
self.report({'ERROR'}, "Cannot generate materials for unknown %s render engine" % engine)
return {'CANCELLED'}
else:

View File

@ -355,7 +355,7 @@ class BTool_DrawPolyBrush(Operator):
actObj.select_set(state=True)
bpy.ops.gpencil.draw("INVOKE_DEFAULT", mode="DRAW_POLY")
if event.type in {"RIGHTMOUSE"}:
if event.type == "RIGHTMOUSE":
# use this to pass to the Grease Pencil eraser (see T52321)
pass
@ -396,7 +396,7 @@ class BTool_DrawPolyBrush(Operator):
return {"FINISHED"}
if event.type in {"ESC"}:
if event.type == "ESC":
bpy.ops.ed.undo() # remove o Grease Pencil
self.set_cont_draw(context)

View File

@ -210,7 +210,7 @@ class CARVER_OT_operator(bpy.types.Operator):
self.check_region(context,event)
for area in win.screen.areas:
if area.type in ('VIEW_3D'):
if area.type == 'VIEW_3D':
for region in area.regions:
if not region_types or region.type in region_types:
region.tag_redraw()

View File

@ -80,7 +80,7 @@ class PIE_OT_InsertAutoKeyframe(Operator):
ts.use_keyframe_insert_auto ^= 1
for area in context.screen.areas:
if area.type in ('TIMELINE'):
if area.type == 'TIMELINE':
area.tag_redraw()
return {'FINISHED'}