From 41469acbc8642868ee430945c7b55e0ae4145e9e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 22 Mar 2026 13:58:10 +1100 Subject: [PATCH] Fix walrus operator precedence in MaterialCreator The `is not ...` was being captured by the walrus assignment due to missing parentheses, causing the condition to always evaluate incorrectly. Co-Authored-By: Claude Opus 4.6 --- src/bonsai/bonsai/bim/import_ifc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/import_ifc.py b/src/bonsai/bonsai/bim/import_ifc.py index 11b92be532..d6758de903 100644 --- a/src/bonsai/bonsai/bim/import_ifc.py +++ b/src/bonsai/bonsai/bim/import_ifc.py @@ -64,8 +64,8 @@ class MaterialCreator: mesh: Union[OBJECT_DATA_TYPE, None], shape_has_openings: bool, ) -> None: - if ((rep := getattr(element, "Representation", ...) is not ...) and not rep) or ( - (rep := getattr(element, "RepresentationMaps", ...) is not ...) and not rep + if (((rep := getattr(element, "Representation", ...)) is not ... and not rep) or + ((rep := getattr(element, "RepresentationMaps", ...)) is not ... and not rep) ): return