diff --git a/nix/build-all.py b/nix/build-all.py index 2fe10d6463..764705688f 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -358,7 +358,7 @@ yacc = "yacc" # Used during swig building process, installed with `bison` on De missing_commands: "list[str]" = [] required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz] if "wasm" in flags: - required_commands.remove(yacc) # yacc not needed for wasm builds + required_commands.remove(yacc) # yacc not needed for wasm builds for cmd in required_commands: if which(cmd) is None: missing_commands.append(cmd) @@ -932,7 +932,7 @@ if "libxml2" in targets: if MAC_CROSS_COMPILE_INTEL: OLD_CC = os.environ.get("CC") os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC - build_tool_args=[ + build_tool_args = [ "--without-python", ENABLE_FLAG, DISABLE_FLAG, @@ -1258,21 +1258,25 @@ if "cgal" in targets: cmake_args_prefix_path.append(f"{DEPS_DIR}/install/gmp-{GMP_VERSION}") cmake_args_prefix_path.append(f"{DEPS_DIR}/install/mpfr-{MPFR_VERSION}") if "wasm" in flags: - cmake_args.extend([ - f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include", - f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include", - f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib", - f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include", - f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib", - ]) + cmake_args.extend( + [ + f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include", + f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include", + f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib", + f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include", + f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib", + ] + ) if "occ" in targets and USE_OCCT: cmake_args_prefix_path.append(f"{DEPS_DIR}/install/occt-{OCCT_VERSION}") if "wasm" in flags: - cmake_args.extend([ - f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade", - f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib", - ]) + cmake_args.extend( + [ + f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade", + f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib", + ] + ) elif "occ" in targets: # We don't support find_package for OCE. diff --git a/src/bonsai/bonsai/tool/project.py b/src/bonsai/bonsai/tool/project.py index 11f3dfd9ff..bc2616fb15 100644 --- a/src/bonsai/bonsai/tool/project.py +++ b/src/bonsai/bonsai/tool/project.py @@ -486,7 +486,7 @@ class Project(bonsai.core.tool.Project): @classmethod def get_clipping_planes_normals(cls): - normals =[] + normals = [] for clipping_plane in tool.Project.get_project_props().clipping_planes: plane = clipping_plane.obj if not plane or not plane.data: @@ -502,4 +502,3 @@ class Project(bonsai.core.tool.Project): d2 = v3 - v2 normals.append((v1, d1.cross(d2).normalized())) return normals - diff --git a/src/bonsai/bonsai/tool/raycast.py b/src/bonsai/bonsai/tool/raycast.py index 7f3b1b877a..8f533e5e71 100644 --- a/src/bonsai/bonsai/tool/raycast.py +++ b/src/bonsai/bonsai/tool/raycast.py @@ -165,7 +165,6 @@ class Raycast(bonsai.core.tool.Raycast): return False return True - @classmethod def get_viewport_ray_data( cls, context: bpy.types.Context, event: bpy.types.Event, mouse_pos: tuple[int, int] = None @@ -455,7 +454,7 @@ class Raycast(bonsai.core.tool.Raycast): if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d): if tool.Raycast.object_is_visible_in_clipping_plane(obj): objs_to_raycast.append(obj) - + return objs_to_raycast @classmethod @@ -544,4 +543,3 @@ class Raycast(bonsai.core.tool.Raycast): if lens < 50: snap_threshold *= value return snap_threshold - diff --git a/src/bonsai/bonsai/tool/snap.py b/src/bonsai/bonsai/tool/snap.py index 557979e5ae..00deae9090 100644 --- a/src/bonsai/bonsai/tool/snap.py +++ b/src/bonsai/bonsai/tool/snap.py @@ -491,7 +491,11 @@ class Snap(bonsai.core.tool.Snap): "distance": 10, # High value so it has low priority } detected_snaps.append(snap_point) - detected_snaps = [snap for snap in detected_snaps if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")] + detected_snaps = [ + snap + for snap in detected_snaps + if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane") + ] return detected_snaps @classmethod diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 060953aafb..74cee2d701 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -185,7 +185,7 @@ def open( return sqlite(path) if should_stream: return stream(path) - if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux. + if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux. f = ifcopenshell_wrapper.open(str(path.absolute()), readonly) else: f = ifcopenshell_wrapper.open(str(path.absolute())) diff --git a/src/ifctester/ifctester/reporter.py b/src/ifctester/ifctester/reporter.py index 754a32755f..b4b9929d88 100644 --- a/src/ifctester/ifctester/reporter.py +++ b/src/ifctester/ifctester/reporter.py @@ -442,7 +442,7 @@ class Html(Json): def report(self) -> None: super().report() for spec in self.results["specifications"]: - print('checking', spec["cardinality"]) + print("checking", spec["cardinality"]) if spec["cardinality"] == "optional" and spec["total_checks"] == 0: spec["is_skipped"] = True spec["is_prohibited"] = spec["cardinality"] == "prohibited"