Apply ruff linting rules to tests (#2473)

* everything except F821

* enable F821 with noqa

* dumb fix

* fix remaining imports and (former) lambdas

* replace _ with noqa to avoid gc
This commit is contained in:
Christopher Mauri Milan
2023-11-27 21:24:06 -08:00
committed by GitHub
parent 136dbd8b36
commit 7f01dd04f0
32 changed files with 46 additions and 70 deletions

View File

@@ -42,11 +42,11 @@ class TestAssign(unittest.TestCase):
a.realize()
b.realize()
#GlobalCounters.cache = []
ba1 = a.lazydata.realized
bb1 = b.lazydata.realized
ba1 = a.lazydata.realized # noqa: F841
bb1 = b.lazydata.realized # noqa: F841
a.assign(a.permute(1,0) + b) # this should not work!
a.realize()
ba2 = a.lazydata.realized
ba2 = a.lazydata.realized # noqa: F841
# NOTE: don't test that it's assigned
#assert ba1 == ba2 and ba1 != bb1
np.testing.assert_allclose(a.numpy(), np.arange(N*N).reshape((N,N)) + np.arange(N*N).reshape((N,N)).transpose(1,0))