MCPcopy Create free account
hub / github.com/apache/tvm-ffi / _make_cls

Method _make_cls

tests/python/test_dataclass_copy.py:1123–1133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1121 """Copy of @py_class with init=False and custom __init__."""
1122
1123 def _make_cls(self) -> type:
1124 @py_class(_unique_key_pc("CopyCI"), init=False)
1125 class CopyCI(Object):
1126 a: int
1127 b: str
1128
1129 def __init__(self, *, b: str, a: int) -> None:
1130 self.a = a
1131 self.b = b
1132
1133 return CopyCI
1134
1135 def test_shallow_copy_custom_init(self) -> None:
1136 CopyCI = self._make_cls()

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected