Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jul 21, 2023
1 parent ceba1f7 commit dbf5b83
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rerun_py/rerun_sdk/rerun/_rerun2/datatypes/fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _native_to_pa_array(data: AffixFuzzer2ArrayLike, data_type: pa.DataType) ->

@define
class AffixFuzzer3:
inner: Union[float, list[datatypes.AffixFuzzer1], npt.NDArray[np.float32]] = field()
inner: float | list[datatypes.AffixFuzzer1] | npt.NDArray[np.float32] = field()
"""
degrees (float):
Expand Down Expand Up @@ -323,7 +323,7 @@ def _native_to_pa_array(data: AffixFuzzer3ArrayLike, data_type: pa.DataType) ->

@define
class AffixFuzzer4:
inner: Union[datatypes.AffixFuzzer3, list[datatypes.AffixFuzzer3]] = field()
inner: datatypes.AffixFuzzer3 | list[datatypes.AffixFuzzer3] = field()
"""
single_required (datatypes.AffixFuzzer3):
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/rerun_sdk/rerun/_rerun2/datatypes/rotation3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class Rotation3D:
"""A 3D rotation."""

inner: Union[datatypes.Quaternion, datatypes.RotationAxisAngle] = field(converter=rotation3d_inner_converter)
inner: datatypes.Quaternion | datatypes.RotationAxisAngle = field(converter=rotation3d_inner_converter)
"""
Quaternion (datatypes.Quaternion):
Rotation defined by a quaternion.
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/rerun_sdk/rerun/_rerun2/datatypes/scale3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Scale3D:
```
"""

inner: Union[datatypes.Vec3D, float] = field(converter=scale3d_inner_converter)
inner: datatypes.Vec3D | float = field(converter=scale3d_inner_converter)
"""
ThreeD (datatypes.Vec3D):
Individual scaling factors for each axis, distorting the original object.
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/rerun_sdk/rerun/_rerun2/datatypes/transform3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class Transform3D:
"""Representation of a 3D affine transform."""

inner: Union[datatypes.TranslationAndMat3x3, datatypes.TranslationRotationScale3D] = field()
inner: datatypes.TranslationAndMat3x3 | datatypes.TranslationRotationScale3D = field()
"""
TranslationAndMat3x3 (datatypes.TranslationAndMat3x3):
Expand Down
4 changes: 3 additions & 1 deletion rerun_py/tests/unit/test_points3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def test_points3d() -> None:
)
print(f"{arch}\n")

assert arch.points == rr_cmp.Point3DArray.from_similar([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]] if non_empty(points) else [])
assert arch.points == rr_cmp.Point3DArray.from_similar(
[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]] if non_empty(points) else []
)
assert arch.radii == rr_cmp.RadiusArray.from_similar([42, 43] if non_empty(radii) else [])
assert arch.colors == rr_cmp.ColorArray.from_similar([0xAA0000CC, 0x00BB00DD] if non_empty(colors) else [])
assert arch.labels == rr_cmp.LabelArray.from_similar(["hello", "friend"] if non_empty(labels) else [])
Expand Down

0 comments on commit dbf5b83

Please sign in to comment.