From 6d4eb06d89b845d2c698f411d8e4ad0c03f96568 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 26 Jan 2026 12:15:22 +0500 Subject: [PATCH] black . --- nix/build-all.py | 2 +- src/bonsai/bonsai/tool/system.py | 12 ++++++------ src/bonsai/test/core/test_system.py | 4 ++-- src/bonsai/test/tool/test_system.py | 1 + src/ifc4d/ifc4d/ifc2p6.py | 1 - src/ifcpatch/bootstrap.py | 2 -- .../ifcpatch/recipes/FixArchiCADToRevitSpaces.py | 1 - src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py | 1 - src/ifctester/webapp/public/worker/api.py | 1 - 9 files changed, 10 insertions(+), 15 deletions(-) diff --git a/nix/build-all.py b/nix/build-all.py index b60ab1adbd..2a4318dc35 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1178,7 +1178,7 @@ if "cgal" in targets: gmp_args.extend(("--disable-assembly", "--enable-cxx")) mpfr_args.extend(("--host", "none")) elif "x86" in arch: - gmp_args.append("--enable-fat") # See issues #7458 #7556 + gmp_args.append("--enable-fat") # See issues #7458 #7556 OLD_CC = None if MAC_CROSS_COMPILE_INTEL: diff --git a/src/bonsai/bonsai/tool/system.py b/src/bonsai/bonsai/tool/system.py index 3566dbd863..9df19e5619 100644 --- a/src/bonsai/bonsai/tool/system.py +++ b/src/bonsai/bonsai/tool/system.py @@ -112,20 +112,20 @@ class System(bonsai.core.tool.System): def create_port_at_cursor(cls, element: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance: ifc_file = tool.Ifc.get() element_obj = tool.Ifc.get_object(element) - + port = ifcopenshell.api.system.add_port(ifc_file, element=element) port.FlowDirection = "NOTDEFINED" port.PredefinedType = "USERDEFINED" - + systems = ifcopenshell.util.system.get_element_systems(element) system = systems[0] if systems else None port.SystemType = getattr(system, "PredefinedType", None) or "USERDEFINED" - + matrix = element_obj.matrix_world.copy() matrix.translation = bpy.context.scene.cursor.matrix.translation - + ifcopenshell.api.geometry.edit_object_placement(ifc_file, product=port, matrix=matrix, is_si=True) - + return port @classmethod @@ -218,7 +218,7 @@ class System(bonsai.core.tool.System): for collection in obj.users_collection: target_collection = collection break - + if target_collection: for port_obj in ifc_importer.added_data.values(): if isinstance(port_obj, bpy.types.Object): diff --git a/src/bonsai/test/core/test_system.py b/src/bonsai/test/core/test_system.py index 4612e14d69..1d19189c3b 100644 --- a/src/bonsai/test/core/test_system.py +++ b/src/bonsai/test/core/test_system.py @@ -153,8 +153,8 @@ class TestAddPort: def test_run(self, ifc, system): system.get_ports("element").should_be_called().will_return(["port"]) system.load_ports("element", ["port"]).should_be_called() - #system.create_empty_at_cursor_with_element_orientation("element").should_be_called().will_return("obj") - #system.run_root_assign_class(obj="obj", ifc_class="IfcDistributionPort", should_add_representation=False).should_be_called().will_return("port") + # system.create_empty_at_cursor_with_element_orientation("element").should_be_called().will_return("obj") + # system.run_root_assign_class(obj="obj", ifc_class="IfcDistributionPort", should_add_representation=False).should_be_called().will_return("port") system.create_port_at_cursor("element").should_be_called().will_return("port") system.load_ports("element", ["port"]).should_be_called() subject.add_port(ifc, system, element="element") diff --git a/src/bonsai/test/tool/test_system.py b/src/bonsai/test/tool/test_system.py index ba20305140..1a18811c37 100644 --- a/src/bonsai/test/tool/test_system.py +++ b/src/bonsai/test/tool/test_system.py @@ -103,6 +103,7 @@ class TestCreateEmptyAtCursorWithElementOrientation(NewFile): obj = subject.create_empty_at_cursor_with_element_orientation(element) assert obj.matrix_world == bpy.context.scene.cursor.matrix + class TestCreatePortAtCursor(NewFile): def test_run(self): assert bpy.context.scene diff --git a/src/ifc4d/ifc4d/ifc2p6.py b/src/ifc4d/ifc4d/ifc2p6.py index 9294e91cbf..a4634ca372 100644 --- a/src/ifc4d/ifc4d/ifc2p6.py +++ b/src/ifc4d/ifc4d/ifc2p6.py @@ -25,7 +25,6 @@ import ifcopenshell.util.date import ifcopenshell.util.sequence - class Ifc2P6: def __init__(self): self.xml = None diff --git a/src/ifcpatch/bootstrap.py b/src/ifcpatch/bootstrap.py index b4fd470b49..f703e25969 100644 --- a/src/ifcpatch/bootstrap.py +++ b/src/ifcpatch/bootstrap.py @@ -15,5 +15,3 @@ # # You should have received a copy of the GNU Lesser General Public License # along with IfcPatch. If not, see . - - diff --git a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py index 2245f8c0df..38a7a2950e 100644 --- a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py +++ b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py @@ -19,7 +19,6 @@ import logging - class Patcher: def __init__(self, file: None, logger: logging.Logger, filepath: str): """Allow ArchiCAD IFC spaces to open as Revit rooms diff --git a/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py b/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py index 4d2eb030d5..6c083456e9 100644 --- a/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py +++ b/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py @@ -20,7 +20,6 @@ import logging - class Patcher: def __init__(self, file: None, logger: logging.Logger, filepath: str, is_solid: bool = True): """Fix missing or spot-coordinate bugged TINs loading in Revit diff --git a/src/ifctester/webapp/public/worker/api.py b/src/ifctester/webapp/public/worker/api.py index 4489d358d5..ebf4bbe01a 100644 --- a/src/ifctester/webapp/public/worker/api.py +++ b/src/ifctester/webapp/public/worker/api.py @@ -1,4 +1,3 @@ - import ifcopenshell import ifcopenshell.util.attribute import ifcopenshell.util.pset