Skip to content

Commit 2691707

Browse files
committed
Add unsafe fixes
1 parent 39332c7 commit 2691707

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/data_morph/bounds/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _validate_2d(data: Iterable[Number], name: str) -> Iterable[Number]:
2121
The validated data.
2222
"""
2323
if not (
24-
isinstance(data, (tuple, list))
24+
isinstance(data, tuple | list)
2525
and len(data) == 2
2626
and all(isinstance(x, Number) and not isinstance(x, bool) for x in data)
2727
):

src/data_morph/bounds/bounding_box.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(
3838
if isinstance(inclusive, bool):
3939
inclusive = [inclusive] * 2
4040
if not (
41-
isinstance(inclusive, (tuple, list))
41+
isinstance(inclusive, tuple | list)
4242
and len(inclusive) == 2
4343
and all(isinstance(x, bool) for x in inclusive)
4444
):
@@ -47,19 +47,19 @@ def __init__(
4747
' or a single Boolean value'
4848
)
4949

50-
self.x_bounds = (
50+
self.x_bounds: Interval = (
5151
x_bounds.clone()
5252
if isinstance(x_bounds, Interval)
5353
else Interval(x_bounds, inclusive[0])
5454
)
55-
"""Interval: The bounds for the x direction."""
55+
"""The bounds for the x direction."""
5656

57-
self.y_bounds = (
57+
self.y_bounds: Interval = (
5858
y_bounds.clone()
5959
if isinstance(y_bounds, Interval)
6060
else Interval(y_bounds, inclusive[1])
6161
)
62-
"""Interval: The bounds for the y direction."""
62+
"""The bounds for the y direction."""
6363

6464
self._bounds = (self.x_bounds, self.y_bounds)
6565

0 commit comments

Comments
 (0)