Codebase list eagerpy / 735bff6
removed __init__ return type annotation Jonas Rauber 4 years ago
4 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2323 """A wrapper for modules that delays the import until it is needed
2424 and wraps the output of functions as EagerPy tensors"""
2525
26 def __init__(self, *args: Any, **kwargs: Any) -> None:
26 def __init__(self, *args: Any, **kwargs: Any):
2727 super().__init__(*args, **kwargs)
2828 if self.__doc__ is None:
2929 self.__doc__ = f"EagerPy wrapper of the '{self.__name__}' module"
1616 class BaseTensor(Tensor):
1717 __slots__ = "_raw"
1818
19 def __init__(self: TensorType, raw: Any) -> None:
19 def __init__(self: TensorType, raw: Any):
2020 assert not isinstance(raw, Tensor)
2121 self._raw = raw
2222
4242
4343
4444 class ExtensionMethods(metaclass=GenericExtensionMeta):
45 def __init__(self, instance: Tensor) -> None:
45 def __init__(self, instance: Tensor):
4646 self._instance = instance
4747
4848
3333
3434 # supports lazy extension loading to break cyclic dependencies
3535
36 def __init__(self, cache_name: str, extension_name: str) -> None:
36 def __init__(self, cache_name: str, extension_name: str):
3737 self._cache_name = cache_name
3838 self._extension_name = extension_name
3939
7575 __module__ = "eagerpy"
7676
7777 @abstractmethod
78 def __init__(self, raw: Any) -> None:
78 def __init__(self, raw: Any):
7979 ...
8080
8181 @property