Cleanup: pass multiple arguments to str.startswith

This commit is contained in:
Campbell Barton
2024-10-30 16:31:25 +11:00
parent 160e76cd9d
commit f86710b90f
2 changed files with 5 additions and 3 deletions

View File

@@ -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):

View File

@@ -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"