Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Remove implicit `object` from the base class (#1089)

deepsource-autofix[bot]86c3a335c49e
diff --git a/test/utils/test_helpers.py b/test/utils/test_helpers.py
index 587b9d737..de437ce6c 100644
--- a/test/utils/test_helpers.py
+++ b/test/utils/test_helpers.py
@@ -54,7 +54,7 @@ def test_extract_device_dtype(tensor_list, out_device, out_dtype, will_throw_err
assert dtype == out_dtype
-class TestInverseCast(object):
+class TestInverseCast:
@pytest.mark.parametrize("input_shape", [(1, 3, 4, 4), (2, 4, 5, 5)])
def test_smoke(self, device, dtype, input_shape):
x = torch.rand(input_shape, device=device, dtype=dtype)
@@ -77,7 +77,7 @@ class TestInverseCast(object):
assert_allclose(op(x), op_jit(x))
-class TestHistcCast(object):
+class TestHistcCast:
def test_smoke(self, device, dtype):
x = torch.tensor([1.0, 2.0, 1.0], device=device, dtype=dtype)
y_expected = torch.tensor([0.0, 2.0, 1.0, 0.0], device=device, dtype=dtype)
@@ -87,7 +87,7 @@ class TestHistcCast(object):
assert_allclose(y, y_expected)
-class TestSvdCast(object):
+class TestSvdCast:
def test_smoke(self, device, dtype):
a = torch.randn(5, 3, 3, device=device, dtype=dtype)
u, s, v = _torch_svd_cast(a)
@@ -96,7 +96,7 @@ class TestSvdCast(object):
assert_allclose(a, u @ torch.diag_embed(s) @ v.transpose(-2, -1), atol=tol_val, rtol=tol_val)
-class TestSolveCast(object):
+class TestSolveCast:
def test_smoke(self, device, dtype):
A = torch.randn(2, 3, 1, 4, 4, device=device, dtype=dtype)
B = torch.randn(2, 3, 1, 4, 6, device=device, dtype=dtype)