From cf3393b6a098c786edbdce233ce1291e1c021c7b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 14 Jan 2026 14:09:40 +0100 Subject: [PATCH] black --- src/ifcopenshell-python/ifcopenshell/entity_instance.py | 2 +- src/ifcopenshell-python/ifcopenshell/file.py | 2 +- src/ifcopenshell-python/ifcopenshell/geom/main.py | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py index 1da11d9400..8e7047d72b 100644 --- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py +++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py @@ -146,7 +146,7 @@ class entity_instance_mixin: for sty in yield_supertypes(): if fn := getattr(rules, f"calc_{sty}_{name}", None): return fn(self) - + raise AttributeError("entity instance of type '%s' has no attribute '%s'" % (self.is_a(True), name)) @staticmethod diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 9baaeac465..20bbaf6165 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -895,7 +895,7 @@ class file_mixin: def to_string(self) -> str: return self.to_string() - + @staticmethod def _determine_schema_identifier( schema: Optional[ifcopenshell.util.schema.IFC_SCHEMA] = None, diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py index 38903e5948..84866892ce 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/main.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py @@ -507,7 +507,11 @@ def create_shape( """ return wrap_shape_creation( settings, - ifcopenshell_wrapper.create_shape(settings, inst, repr, geometry_library) if repr else ifcopenshell_wrapper.create_shape(settings, inst, geometry_library), + ( + ifcopenshell_wrapper.create_shape(settings, inst, repr, geometry_library) + if repr + else ifcopenshell_wrapper.create_shape(settings, inst, geometry_library) + ), )