Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ exclude: "tests/integration/files"
repos:

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

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.12.1]
additional_dependencies: [black==24.1.1]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
Expand Down
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx documentation configuration file."""

from datetime import datetime
import json
import os
Expand Down
16 changes: 10 additions & 6 deletions src/ansys/geometry/core/math/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ def __init__(
super().__init__(unit, expected_dimensions=DEFAULT_UNITS.LENGTH)

# Check the inputs
check_ndarray_is_float_int(input, "input") if isinstance(
input, np.ndarray
) else check_ndarray_is_float_int(np.asarray(input), "input")
(
check_ndarray_is_float_int(input, "input")
if isinstance(input, np.ndarray)
else check_ndarray_is_float_int(np.asarray(input), "input")
)

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

# Check the inputs
check_ndarray_is_float_int(input, "input") if isinstance(
input, np.ndarray
) else check_ndarray_is_float_int(np.asarray(input), "input")
(
check_ndarray_is_float_int(input, "input")
if isinstance(input, np.ndarray)
else check_ndarray_is_float_int(np.asarray(input), "input")
)

# Check dimensions
if len(input) != 3:
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/test_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ def test_face_to_body_creation(modeler: Modeler):

assert len(design.components) == 0
assert len(design.bodies) == 3
assert longest_body.volume.m == pytest.approx(
Quantity(3e-6, UNITS.m**3).m, rel=1e-6, abs=1e-8
)
assert longest_body.volume.m == pytest.approx(Quantity(3e-6, UNITS.m**3).m, rel=1e-6, abs=1e-8)

nested_component = design.add_component("NestedComponent")
surface_body = nested_component.create_surface_from_face(
Expand Down