From f86710b90fb52a2b7829436d8bbbade4b957fef7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 Oct 2024 16:31:25 +1100 Subject: [PATCH] Cleanup: pass multiple arguments to str.startswith --- tests/python/bl_id_management.py | 2 +- tools/debug/gdb/blender_gdb_extension.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/python/bl_id_management.py b/tests/python/bl_id_management.py index 356ae55e232..f7030951d69 100644 --- a/tests/python/bl_id_management.py +++ b/tests/python/bl_id_management.py @@ -21,7 +21,7 @@ class TestRNAIDTypes(unittest.TestCase): "textures": {'type': 'NONE'}, } for container_id in dir(bpy.data): - if container_id.startswith("rna") or container_id.startswith("__") or container_id.startswith("version"): + if container_id.startswith(("rna", "__", "version")): continue container = getattr(bpy.data, container_id) if callable(container): diff --git a/tools/debug/gdb/blender_gdb_extension.py b/tools/debug/gdb/blender_gdb_extension.py index 5d4cd217b11..e8c7d11a0e2 100644 --- a/tools/debug/gdb/blender_gdb_extension.py +++ b/tools/debug/gdb/blender_gdb_extension.py @@ -531,8 +531,10 @@ class LazyFunctionEvalFilter: @staticmethod def frame_to_name(frame): function_name = frame.function() - if (function_name.startswith("blender::fn::lazy_function::LazyFunction::execute") - or function_name.startswith("blender::fn::lazy_function::Executor::push_to_task_pool")): + if function_name.startswith(( + "blender::fn::lazy_function::LazyFunction::execute", + "blender::fn::lazy_function::Executor::push_to_task_pool", + )): return "Execute Lazy Function"