From 5a1503953096927860b68f6315e354d2e39fb8bc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Feb 2021 15:26:32 +1100 Subject: Cleanup: use the assignment operator with list-comprehension --- release/scripts/startup/bl_operators/uvcalc_lightmap.py | 3 +-- release/scripts/startup/bl_operators/wm.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup') diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index d13e98b96e9..34c36443431 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -568,8 +568,7 @@ def unwrap(operator, context, **kwargs): meshes = list({ me for obj in context.selected_objects if obj.type == 'MESH' - for me in (obj.data,) - if me.polygons and me.library is None + if (me := obj.data).polygons and me.library is None }) if not meshes: diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 2ee20e08589..c5457713d36 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2191,8 +2191,7 @@ class WM_OT_batch_rename(Operator): id for ob in context.selected_objects if ob.type == data_type - for id in (ob.data,) - if id is not None and id.library is None + if (id := ob.data) is not None and id.library is None )) if only_selected else [id for id in getattr(bpy.data, attr) if id.library is None], -- cgit v1.2.3