Skip to content

Commit 2d0c42b

Browse files
chore: pre-commit automatic update (#2230)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 5bf5f74 commit 2d0c42b

27 files changed

+74
-76
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude: "tests/integration/files"
77
repos:
88

99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.12.12
10+
rev: v0.13.0
1111
hooks:
1212
- id: ruff-check
1313
- id: ruff-format
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Pre-commit automatic update

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
from typing import TYPE_CHECKING
2525

26-
import pint
27-
2826
from ansys.api.dbu.v0.admin_pb2 import BackendType as GRPCBackendType
2927
from ansys.api.dbu.v0.dbumodels_pb2 import (
3028
DrivingDimension as GRPCDrivingDimension,
@@ -55,6 +53,8 @@
5553
TrimmedCurve as GRPCTrimmedCurve,
5654
TrimmedSurface as GRPCTrimmedSurface,
5755
)
56+
import pint
57+
5858
from ansys.geometry.core.errors import GeometryRuntimeError
5959
from ansys.geometry.core.misc.checks import graphics_required
6060

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def set_color(self, **kwargs) -> dict: # noqa: D102
201201
@protect_grpc
202202
def get_normal(self, **kwargs) -> dict: # noqa: D102
203203
from ansys.api.geometry.v0.faces_pb2 import GetNormalRequest
204+
204205
from ansys.geometry.core.math.vector import UnitVector3D
205206

206207
# Create the request - assumes all inputs are valid and of the proper type
@@ -242,6 +243,7 @@ def evaluate(self, **kwargs) -> dict: # noqa: D102
242243
@protect_grpc
243244
def create_iso_parametric_curve(self, **kwargs) -> dict: # noqa: D102
244245
from ansys.api.geometry.v0.faces_pb2 import CreateIsoParamCurvesRequest
246+
245247
from ansys.geometry.core.shapes.parameterization import Interval
246248

247249
# Create the request - assumes all inputs are valid and of the proper type

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ def extract_volume_from_edge_loops(self, **kwargs) -> dict: # noqa: D102
8989

9090
@protect_grpc
9191
def remove_rounds(self, **kwargs) -> dict: # noqa: D102
92-
from google.protobuf.wrappers_pb2 import BoolValue
93-
9492
from ansys.api.geometry.v0.models_pb2 import Face
9593
from ansys.api.geometry.v0.preparetools_pb2 import RemoveRoundsRequest
94+
from google.protobuf.wrappers_pb2 import BoolValue
9695

9796
# Create the request - assumes all inputs are valid and of the proper type
9897
request = RemoveRoundsRequest(
@@ -110,10 +109,9 @@ def remove_rounds(self, **kwargs) -> dict: # noqa: D102
110109

111110
@protect_grpc
112111
def share_topology(self, **kwargs) -> dict: # noqa: D102
113-
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
114-
115112
from ansys.api.geometry.v0.models_pb2 import Body
116113
from ansys.api.geometry.v0.preparetools_pb2 import ShareTopologyRequest
114+
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
117115

118116
# Create the request - assumes all inputs are valid and of the proper type
119117
request = ShareTopologyRequest(
@@ -132,10 +130,9 @@ def share_topology(self, **kwargs) -> dict: # noqa: D102
132130

133131
@protect_grpc
134132
def enhanced_share_topology(self, **kwargs) -> dict: # noqa: D102
135-
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
136-
137133
from ansys.api.geometry.v0.models_pb2 import Body
138134
from ansys.api.geometry.v0.preparetools_pb2 import ShareTopologyRequest
135+
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
139136

140137
# Create the request - assumes all inputs are valid and of the proper type
141138
request = ShareTopologyRequest(

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

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ def __init__(self, channel: grpc.Channel):
5454

5555
@protect_grpc
5656
def find_split_edges(self, **kwargs) -> dict: # noqa: D102
57-
from google.protobuf.wrappers_pb2 import DoubleValue
58-
5957
from ansys.api.geometry.v0.repairtools_pb2 import FindSplitEdgesRequest
58+
from google.protobuf.wrappers_pb2 import DoubleValue
6059

6160
# Create the request - assumes all inputs are valid and of the proper type
6261
request = FindSplitEdgesRequest(
@@ -123,9 +122,8 @@ def find_inexact_edges(self, **kwargs) -> dict: # noqa: D102
123122

124123
@protect_grpc
125124
def find_short_edges(self, **kwargs) -> dict: # noqa: D102
126-
from google.protobuf.wrappers_pb2 import DoubleValue
127-
128125
from ansys.api.geometry.v0.repairtools_pb2 import FindShortEdgesRequest
126+
from google.protobuf.wrappers_pb2 import DoubleValue
129127

130128
# Create the request - assumes all inputs are valid and of the proper type
131129
request = FindShortEdgesRequest(
@@ -170,9 +168,9 @@ def find_duplicate_faces(self, **kwargs) -> dict: # noqa: D102
170168

171169
@protect_grpc
172170
def find_missing_faces(self, **kwargs) -> dict: # noqa: D102
171+
from ansys.api.geometry.v0.repairtools_pb2 import FindMissingFacesRequest
173172
from google.protobuf.wrappers_pb2 import DoubleValue
174173

175-
from ansys.api.geometry.v0.repairtools_pb2 import FindMissingFacesRequest
176174
from ansys.geometry.core.logger import LOG
177175

178176
from ..base.conversions import (
@@ -221,9 +219,9 @@ def find_missing_faces(self, **kwargs) -> dict: # noqa: D102
221219

222220
@protect_grpc
223221
def find_small_faces(self, **kwargs) -> dict: # noqa: D102
222+
from ansys.api.geometry.v0.repairtools_pb2 import FindSmallFacesRequest
224223
from google.protobuf.wrappers_pb2 import DoubleValue
225224

226-
from ansys.api.geometry.v0.repairtools_pb2 import FindSmallFacesRequest
227225
from ansys.geometry.core.logger import LOG
228226

229227
from ..base.conversions import (
@@ -272,9 +270,9 @@ def find_small_faces(self, **kwargs) -> dict: # noqa: D102
272270

273271
@protect_grpc
274272
def find_stitch_faces(self, **kwargs) -> dict: # noqa: D102
273+
from ansys.api.geometry.v0.repairtools_pb2 import FindStitchFacesRequest
275274
from google.protobuf.wrappers_pb2 import DoubleValue
276275

277-
from ansys.api.geometry.v0.repairtools_pb2 import FindStitchFacesRequest
278276
from ansys.geometry.core.logger import LOG
279277

280278
from ..base.conversions import from_measurement_to_server_length
@@ -360,9 +358,8 @@ def find_and_fix_simplify(self, **kwargs) -> dict: # noqa: D102
360358

361359
@protect_grpc
362360
def find_and_fix_stitch_faces(self, **kwargs) -> dict: # noqa: D102
363-
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
364-
365361
from ansys.api.geometry.v0.repairtools_pb2 import FindStitchFacesRequest
362+
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
366363

367364
from ..base.conversions import from_measurement_to_server_length
368365

@@ -427,9 +424,8 @@ def repair_geometry(self, **kwargs) -> dict: # noqa: D102
427424

428425
@protect_grpc
429426
def find_interferences(self, **kwargs) -> dict: # noqa: D102
430-
from google.protobuf.wrappers_pb2 import BoolValue
431-
432427
from ansys.api.geometry.v0.repairtools_pb2 import FindInterferenceRequest
428+
from google.protobuf.wrappers_pb2 import BoolValue
433429

434430
# Create the request - assumes all inputs are valid and of the proper type
435431
request = FindInterferenceRequest(
@@ -453,9 +449,8 @@ def find_interferences(self, **kwargs) -> dict: # noqa: D102
453449

454450
@protect_grpc
455451
def find_and_fix_short_edges(self, **kwargs): # noqa: D102
456-
from google.protobuf.wrappers_pb2 import DoubleValue
457-
458452
from ansys.api.geometry.v0.repairtools_pb2 import FindShortEdgesRequest
453+
from google.protobuf.wrappers_pb2 import DoubleValue
459454

460455
# Create the request - assumes all inputs are valid and of the proper type
461456
request = FindShortEdgesRequest(
@@ -510,9 +505,8 @@ def find_and_fix_extra_edges(self, **kwargs) -> dict: # noqa: D102
510505

511506
@protect_grpc
512507
def find_and_fix_split_edges(self, **kwargs) -> dict: # noqa: D102
513-
from google.protobuf.wrappers_pb2 import DoubleValue
514-
515508
from ansys.api.geometry.v0.repairtools_pb2 import FindSplitEdgesRequest
509+
from google.protobuf.wrappers_pb2 import DoubleValue
516510

517511
# Create the request - assumes all inputs are valid and of the proper type
518512
request = FindSplitEdgesRequest(

src/ansys/geometry/core/connection/conversions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
from typing import TYPE_CHECKING
2525

26-
from pint import Quantity, UndefinedUnitError
27-
2826
from ansys.api.geometry.v0.models_pb2 import (
2927
Arc as GRPCArc,
3028
Circle as GRPCCircle,
@@ -43,6 +41,8 @@
4341
Surface as GRPCSurface,
4442
TrimmedCurve as GRPCTrimmedCurve,
4543
)
44+
from pint import Quantity, UndefinedUnitError
45+
4646
from ansys.geometry.core.materials.material import (
4747
Material,
4848
MaterialProperty,

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
import subprocess # nosec B404
3333
from typing import TYPE_CHECKING
3434

35+
from ansys.tools.path import get_available_ansys_installations, get_latest_ansys_installation
36+
3537
from ansys.geometry.core.connection.backend import ApiVersions, BackendType
3638
from ansys.geometry.core.logger import LOG
37-
from ansys.tools.path import get_available_ansys_installations, get_latest_ansys_installation
3839

3940
if TYPE_CHECKING: # pragma: no cover
4041
from ansys.geometry.core.modeler import Modeler

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
from functools import cached_property, wraps
2828
from typing import TYPE_CHECKING, Union
2929

30-
from beartype import beartype as check_input_types
31-
import matplotlib.colors as mcolors
32-
from pint import Quantity
33-
3430
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
3531
from ansys.api.geometry.v0.commands_pb2 import (
3632
AssignMidSurfaceOffsetTypeRequest,
@@ -43,6 +39,10 @@
4339
ShellRequest,
4440
)
4541
from ansys.api.geometry.v0.commands_pb2_grpc import CommandsStub
42+
from beartype import beartype as check_input_types
43+
import matplotlib.colors as mcolors
44+
from pint import Quantity
45+
4646
from ansys.geometry.core.connection.client import GrpcClient
4747
from ansys.geometry.core.connection.conversions import (
4848
plane_to_grpc_plane,
@@ -1851,12 +1851,13 @@ def plot( # noqa: D102
18511851
**plotting_options: dict | None,
18521852
) -> None:
18531853
# lazy import here to improve initial module load time
1854-
import ansys.geometry.core as pyansys_geometry
1855-
from ansys.geometry.core.plotting import GeometryPlotter
18561854
from ansys.tools.visualization_interface.types.mesh_object_plot import (
18571855
MeshObjectPlot,
18581856
)
18591857

1858+
import ansys.geometry.core as pyansys_geometry
1859+
from ansys.geometry.core.plotting import GeometryPlotter
1860+
18601861
use_service_colors = (
18611862
use_service_colors
18621863
if use_service_colors is not None

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
from typing import TYPE_CHECKING, Any, Optional, Union
2828
import uuid
2929

30-
from beartype import beartype as check_input_types
31-
from pint import Quantity
32-
3330
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
3431
from ansys.api.geometry.v0.commands_pb2 import (
3532
CreateBeamSegmentsRequest,
@@ -45,6 +42,9 @@
4542
)
4643
from ansys.api.geometry.v0.components_pb2_grpc import ComponentsStub
4744
from ansys.api.geometry.v0.models_pb2 import Direction, Line, SetObjectNameRequest
45+
from beartype import beartype as check_input_types
46+
from pint import Quantity
47+
4848
from ansys.geometry.core.connection.client import GrpcClient
4949
from ansys.geometry.core.connection.conversions import (
5050
grpc_curve_to_curve,

0 commit comments

Comments
 (0)