Skip to content

Commit cbc9562

Browse files
committed
resolve merge conflict + style changes from pre-commit
1 parent eb8c3ca commit cbc9562

File tree

8 files changed

+25
-23
lines changed

8 files changed

+25
-23
lines changed

src/ansys/geometry/core/_grpc/_services/base/designs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ def get_active(self, **kwargs) -> dict:
8888
def _serialize_tracker_command_response(self, **kwargs) -> dict:
8989
"""Get a serialized response from the tracker."""
9090
pass
91-

src/ansys/geometry/core/_grpc/_services/v0/bodies.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,13 @@ def boolean(self, **kwargs) -> dict: # noqa: D102
768768

769769
# Return the response - formatted as a dictionary
770770
return {"complete_command_response": serialized_tracker_response}
771-
771+
772772
@protect_grpc
773773
def combine(self, **kwargs) -> dict: # noqa: D102):
774-
from ansys.api.geometry.v0.bodies_pb2 import CombineIntersectBodiesRequest
775-
from ansys.api.geometry.v0.bodies_pb2 import CombineMergeBodiesRequest
774+
from ansys.api.geometry.v0.bodies_pb2 import (
775+
CombineIntersectBodiesRequest,
776+
CombineMergeBodiesRequest,
777+
)
776778

777779
parent_design = get_design_from_body(self)
778780
other_bodies = kwargs["other"]
@@ -819,8 +821,8 @@ def combine(self, **kwargs) -> dict: # noqa: D102):
819821

820822
tracker_response = response.result.complete_command_response
821823
serialized_tracker_response = parent_design._serialize_tracker_command_response(
822-
response=tracker_response)
823-
824-
# Return the response - formatted as a dictionary
824+
response=tracker_response
825+
)
826+
827+
# Return the response - formatted as a dictionary
825828
return {"complete_command_response": serialized_tracker_response}
826-

src/ansys/geometry/core/_grpc/_services/v0/designs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def get_active(self, **kwargs) -> dict: # noqa: D102
194194
"main_part_id": response.main_part.id,
195195
"name": response.name,
196196
}
197-
197+
198198
def _serialize_tracker_command_response(self, **kwargs) -> dict:
199199
"""Serialize a TrackerCommandResponse object into a dictionary.
200200
@@ -244,4 +244,4 @@ def serialize_entity_identifier(entity):
244244
serialize_entity_identifier(entity)
245245
for entity in getattr(response, "deleted_bodies", [])
246246
],
247-
}
247+
}

src/ansys/geometry/core/_grpc/_services/v0/repair_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def find_and_fix_extra_edges(self, **kwargs) -> dict: # noqa: D102
490490
response = self.stub.FindAndFixExtraEdges(request)
491491

492492
serialized_tracker_response = kwargs["parent_design"]._serialize_tracker_command_response(
493-
response = response.complete_command_response
493+
response=response.complete_command_response
494494
)
495495

496496
# Return the response - formatted as a dictionary
@@ -520,7 +520,7 @@ def find_and_fix_split_edges(self, **kwargs) -> dict: # noqa: D102
520520
response = self.stub.FindAndFixSplitEdges(request)
521521

522522
serialized_tracker_response = kwargs["parent_design"]._serialize_tracker_command_response(
523-
response = response.complete_command_response
523+
response=response.complete_command_response
524524
)
525525

526526
# Return the response - formatted as a dictionary
@@ -585,4 +585,4 @@ def serialize_issue(issue):
585585
}
586586
for body_issues in response.issues_by_body
587587
]
588-
}
588+
}

src/ansys/geometry/core/_grpc/_services/v1/bodies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def get_tesellation_with_options(self, **kwargs) -> dict: # noqa: D102
191191
@protect_grpc
192192
def boolean(self, **kwargs) -> dict: # noqa: D102
193193
raise NotImplementedError
194-
194+
195195
@protect_grpc
196196
def combine(self, **kwargs) -> dict: # noqa: D102
197-
raise NotImplementedError
197+
raise NotImplementedError

src/ansys/geometry/core/_grpc/_services/v1/designs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def insert(self, **kwargs) -> dict: # noqa: D102
8282
@protect_grpc
8383
def get_active(self, **kwargs) -> dict: # noqa: D102
8484
raise NotImplementedError
85-
86-
def _serialize_tracker_command_response(self, **kwargs) -> dict: # noqa: D102
85+
86+
def _serialize_tracker_command_response(self, **kwargs) -> dict: # noqa: D102
8787
"""Get a serialized response from the tracker."""
8888
raise NotImplementedError

src/ansys/geometry/core/designer/body.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
from ansys.api.geometry.v0.commands_pb2 import (
3232
AssignMidSurfaceOffsetTypeRequest,
3333
AssignMidSurfaceThicknessRequest,
34-
CombineIntersectBodiesRequest,
35-
CombineMergeBodiesRequest,
3634
ImprintCurvesRequest,
3735
ProjectCurvesRequest,
3836
RemoveFacesRequest,
@@ -43,6 +41,7 @@
4341
import matplotlib.colors as mcolors
4442
from pint import Quantity
4543

44+
from ansys.geometry.core import USE_TRACKER_TO_UPDATE_DESIGN
4645
from ansys.geometry.core.connection.client import GrpcClient
4746
from ansys.geometry.core.connection.conversions import (
4847
plane_to_grpc_plane,
@@ -1916,9 +1915,10 @@ def __generic_boolean_command(
19161915
) -> None:
19171916
parent_design = get_design_from_body(self)
19181917
other = other if isinstance(other, Iterable) else [other]
1919-
1918+
19201919
response = self._template._grpc_client.services.bodies.combine(
1921-
target=self, other=other, type_bool_op=method, err_msg=err_msg, keep_other=keep_other)
1920+
target=self, other=other, type_bool_op=method, err_msg=err_msg, keep_other=keep_other
1921+
)
19221922

19231923
from ansys.geometry.core import USE_TRACKER_TO_UPDATE_DESIGN
19241924

src/ansys/geometry/core/designer/design.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,6 @@ def __repr__(self) -> str:
10441044
lines.append(f" N Beam Profiles : {len(self.beam_profiles)}")
10451045
lines.append(f" N Design Points : {len(self.design_points)}")
10461046
return "\n".join(lines)
1047-
10481047

10491048
def _serialize_tracker_command_response(self, **kwargs) -> dict:
10501049
"""Serialize a TrackerCommandResponse object into a dictionary.
@@ -1059,7 +1058,9 @@ def _serialize_tracker_command_response(self, **kwargs) -> dict:
10591058
dict
10601059
A dictionary representation of the TrackerCommandResponse object.
10611060
"""
1062-
return self._grpc_client.services.designs._serialize_tracker_command_response(response=kwargs["response"])
1061+
return self._grpc_client.services.designs._serialize_tracker_command_response(
1062+
response=kwargs["response"]
1063+
)
10631064

10641065
def __read_existing_design(self) -> None:
10651066
"""Read an existing ``Design`` located on the server."""

0 commit comments

Comments
 (0)