Source code for descarteslabs.workflows.types.containers.ellipsis

from ....common.graft import client
from ...cereal import serializable
from ..core import Proxytype, ProxyTypeError


[docs]@serializable() class Ellipsis(Proxytype): """ Proxy Ellipsis object. You shouldn't use this directly; Python ellipsis can be used to achieve the same result. """ def __init__(self): self.graft = client.keyref_graft("wf.Ellipsis") self.params = () @classmethod def _promote(cls, obj): if isinstance(obj, cls): return obj elif isinstance(obj, type(Ellipsis)): return cls() else: raise ProxyTypeError("Cannot promote {!r} to {}".format(obj, cls.__name__))
[docs] def compute(self, *args, **kwargs): raise TypeError("{} cannot be computed directly.".format(type(self).__name__))