remove unused dunder methods on ContextProvider

This commit is contained in:
Pierre Chapuis 2024-01-29 15:03:34 +01:00 committed by Cédric Deltheil
parent aa87c303be
commit 849c0058df

View file

@ -29,17 +29,6 @@ class ContextProvider:
provider.update_contexts(contexts) provider.update_contexts(contexts)
return provider return provider
def __add__(self, other: "ContextProvider") -> "ContextProvider":
self.contexts.update(other.contexts)
return self
def __lshift__(self, other: "ContextProvider") -> "ContextProvider":
other.contexts.update(self.contexts)
return other
def __bool__(self) -> bool:
return bool(self.contexts)
def _get_repr_for_value(self, value: Any) -> str: def _get_repr_for_value(self, value: Any) -> str:
if isinstance(value, Tensor): if isinstance(value, Tensor):
return f"Tensor(shape={value.shape}, dtype={value.dtype}, device={value.device})" return f"Tensor(shape={value.shape}, dtype={value.dtype}, device={value.device})"