remove Chain.__add__

This commit is contained in:
Pierre Chapuis 2024-01-29 17:39:02 +01:00 committed by Cédric Deltheil
parent 07954a55ab
commit be961af4d9

View file

@ -285,13 +285,6 @@ class Chain(ContextModule):
def _regenerate_keys(self, modules: Iterable[Module]) -> None:
self._modules = generate_unique_names(tuple(modules)) # type: ignore
def __add__(self, other: "Chain | Module | list[Module]") -> "Chain":
if isinstance(other, Module):
other = Chain(other)
if isinstance(other, list):
other = Chain(*other)
return Chain(*self, *other)
@overload
def __getitem__(self, key: int) -> Module:
...