Skip to content

Commit 6415f0d

Browse files
[pre-commit.ci] pre-commit autoupdate (#964)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com>
1 parent be8bc36 commit 6415f0d

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ exclude: "tests/integration/files"
22
repos:
33

44
- repo: https://github.com/psf/black
5-
rev: 23.12.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
5+
rev: 24.1.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
66
hooks:
77
- id: black
88

99
- repo: https://github.com/adamchainz/blacken-docs
1010
rev: 1.16.0
1111
hooks:
1212
- id: blacken-docs
13-
additional_dependencies: [black==23.12.1]
13+
additional_dependencies: [black==24.1.1]
1414

1515
- repo: https://github.com/pycqa/isort
1616
rev: 5.13.2

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Sphinx documentation configuration file."""
2+
23
from datetime import datetime
34
import json
45
import os

src/ansys/geometry/core/math/point.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ def __init__(
7878
super().__init__(unit, expected_dimensions=DEFAULT_UNITS.LENGTH)
7979

8080
# Check the inputs
81-
check_ndarray_is_float_int(input, "input") if isinstance(
82-
input, np.ndarray
83-
) else check_ndarray_is_float_int(np.asarray(input), "input")
81+
(
82+
check_ndarray_is_float_int(input, "input")
83+
if isinstance(input, np.ndarray)
84+
else check_ndarray_is_float_int(np.asarray(input), "input")
85+
)
8486

8587
# Check dimensions
8688
if len(input) != 2:
@@ -203,9 +205,11 @@ def __init__(
203205
super().__init__(unit, expected_dimensions=DEFAULT_UNITS.LENGTH)
204206

205207
# Check the inputs
206-
check_ndarray_is_float_int(input, "input") if isinstance(
207-
input, np.ndarray
208-
) else check_ndarray_is_float_int(np.asarray(input), "input")
208+
(
209+
check_ndarray_is_float_int(input, "input")
210+
if isinstance(input, np.ndarray)
211+
else check_ndarray_is_float_int(np.asarray(input), "input")
212+
)
209213

210214
# Check dimensions
211215
if len(input) != 3:

tests/integration/test_design.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ def test_face_to_body_creation(modeler: Modeler):
161161

162162
assert len(design.components) == 0
163163
assert len(design.bodies) == 3
164-
assert longest_body.volume.m == pytest.approx(
165-
Quantity(3e-6, UNITS.m**3).m, rel=1e-6, abs=1e-8
166-
)
164+
assert longest_body.volume.m == pytest.approx(Quantity(3e-6, UNITS.m**3).m, rel=1e-6, abs=1e-8)
167165

168166
nested_component = design.add_component("NestedComponent")
169167
surface_body = nested_component.create_surface_from_face(

0 commit comments

Comments
 (0)