diff --git a/pyproject.toml b/pyproject.toml index 46fbdda22b70..152a210d61eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -187,7 +187,6 @@ ignore = [ # TODO: Remove Python-3.10 specific suppressions "B905", "UP035", - "FURB161", ] select = [ "B", diff --git a/test/torch_np/numpy_tests/core/test_scalar_methods.py b/test/torch_np/numpy_tests/core/test_scalar_methods.py index 2bfce58f3944..f51e62d91eb8 100644 --- a/test/torch_np/numpy_tests/core/test_scalar_methods.py +++ b/test/torch_np/numpy_tests/core/test_scalar_methods.py @@ -235,7 +235,7 @@ class TestBitCount(TestCase): def test_small(self, itype): for a in range(max(np.iinfo(itype).min, 0), 128): msg = f"Smoke test for {itype}({a}).bit_count()" - assert itype(a).bit_count() == bin(a).count("1"), msg + assert itype(a).bit_count() == a.bit_count(), msg def test_bit_count(self): for exp in [10, 17, 63]: