mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[FX] Refactor immutable collections implementation (#144640)
Get rid of dynamic class creation via `type(name, bases, ...)`. Convert it to classic static class definition for better readability and static analysis support. Pull Request resolved: https://github.com/pytorch/pytorch/pull/144640 Approved by: https://github.com/jansel ghstack dependencies: #147699
This commit is contained in:
committed by
PyTorch MergeBot
parent
dc9a03d30c
commit
a50af71fb6
@ -3039,7 +3039,7 @@ class TestFX(JitTestCase):
|
||||
from torch.fx.immutable_collections import immutable_list
|
||||
|
||||
x = immutable_list([3, 4])
|
||||
with self.assertRaisesRegex(NotImplementedError, "new_args"):
|
||||
with self.assertRaisesRegex(TypeError, "new_args"):
|
||||
x[0] = 4
|
||||
|
||||
def test_partial_trace(self):
|
||||
|
Reference in New Issue
Block a user