mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 22:48:25 -05:00
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:
committed by
GitHub
parent
136dbd8b36
commit
7f01dd04f0
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user