Skip to content

Commit 923e842

Browse files
committed
black .
1 parent e228095 commit 923e842

6 files changed

Lines changed: 26 additions & 21 deletions

File tree

nix/build-all.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def gather_dependencies(dep: str) -> "Generator[str]":
358358
missing_commands: "list[str]" = []
359359
required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz]
360360
if "wasm" in flags:
361-
required_commands.remove(yacc) # yacc not needed for wasm builds
361+
required_commands.remove(yacc) # yacc not needed for wasm builds
362362
for cmd in required_commands:
363363
if which(cmd) is None:
364364
missing_commands.append(cmd)
@@ -932,7 +932,7 @@ def build_dependency(
932932
if MAC_CROSS_COMPILE_INTEL:
933933
OLD_CC = os.environ.get("CC")
934934
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
935-
build_tool_args=[
935+
build_tool_args = [
936936
"--without-python",
937937
ENABLE_FLAG,
938938
DISABLE_FLAG,
@@ -1258,21 +1258,25 @@ def get_cmake_args_prefix_path(additional_paths: "Sequence[str]" = ()) -> "list[
12581258
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/gmp-{GMP_VERSION}")
12591259
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/mpfr-{MPFR_VERSION}")
12601260
if "wasm" in flags:
1261-
cmake_args.extend([
1262-
f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include",
1263-
f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include",
1264-
f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib",
1265-
f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include",
1266-
f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib",
1267-
])
1261+
cmake_args.extend(
1262+
[
1263+
f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include",
1264+
f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include",
1265+
f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib",
1266+
f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include",
1267+
f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib",
1268+
]
1269+
)
12681270

12691271
if "occ" in targets and USE_OCCT:
12701272
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/occt-{OCCT_VERSION}")
12711273
if "wasm" in flags:
1272-
cmake_args.extend([
1273-
f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade",
1274-
f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib",
1275-
])
1274+
cmake_args.extend(
1275+
[
1276+
f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade",
1277+
f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib",
1278+
]
1279+
)
12761280

12771281
elif "occ" in targets:
12781282
# We don't support find_package for OCE.

src/bonsai/bonsai/tool/project.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def get_header_data(cls) -> HeaderData:
486486

487487
@classmethod
488488
def get_clipping_planes_normals(cls):
489-
normals =[]
489+
normals = []
490490
for clipping_plane in tool.Project.get_project_props().clipping_planes:
491491
plane = clipping_plane.obj
492492
if not plane or not plane.data:
@@ -502,4 +502,3 @@ def get_clipping_planes_normals(cls):
502502
d2 = v3 - v2
503503
normals.append((v1, d1.cross(d2).normalized()))
504504
return normals
505-

src/bonsai/bonsai/tool/raycast.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def point_is_visible_in_clipping_plane(cls, vertex):
165165
return False
166166
return True
167167

168-
169168
@classmethod
170169
def get_viewport_ray_data(
171170
cls, context: bpy.types.Context, event: bpy.types.Event, mouse_pos: tuple[int, int] = None
@@ -455,7 +454,7 @@ def filter_objects_to_raycast(
455454
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d):
456455
if tool.Raycast.object_is_visible_in_clipping_plane(obj):
457456
objs_to_raycast.append(obj)
458-
457+
459458
return objs_to_raycast
460459

461460
@classmethod
@@ -544,4 +543,3 @@ def calculate_snap_threshold(cls, view_distance):
544543
if lens < 50:
545544
snap_threshold *= value
546545
return snap_threshold
547-

src/bonsai/bonsai/tool/snap.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,11 @@ def select_plane_method():
491491
"distance": 10, # High value so it has low priority
492492
}
493493
detected_snaps.append(snap_point)
494-
detected_snaps = [snap for snap in detected_snaps if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")]
494+
detected_snaps = [
495+
snap
496+
for snap in detected_snaps
497+
if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")
498+
]
495499
return detected_snaps
496500

497501
@classmethod

src/ifcopenshell-python/ifcopenshell/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def open(
185185
return sqlite(path)
186186
if should_stream:
187187
return stream(path)
188-
if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux.
188+
if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux.
189189
f = ifcopenshell_wrapper.open(str(path.absolute()), readonly)
190190
else:
191191
f = ifcopenshell_wrapper.open(str(path.absolute()))

src/ifctester/ifctester/reporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def __init__(self, ids: Ids):
442442
def report(self) -> None:
443443
super().report()
444444
for spec in self.results["specifications"]:
445-
print('checking', spec["cardinality"])
445+
print("checking", spec["cardinality"])
446446
if spec["cardinality"] == "optional" and spec["total_checks"] == 0:
447447
spec["is_skipped"] = True
448448
spec["is_prohibited"] = spec["cardinality"] == "prohibited"

0 commit comments

Comments
 (0)