Source code for viam.module.types

from typing import Any, Mapping, Optional, Protocol, runtime_checkable
import warnings


[docs] @runtime_checkable class Reconfigurable(Protocol): """The Reconfigurable protocol defines the requirements for making a resource Reconfigurable"""
[docs] def __init_subclass__(*args, **kwargs): warnings.warn("Reconfigure is deprecated, and resources will always rebuild. It is not necessary to implement Reconfigurable.", DeprecationWarning, stacklevel=2)
[docs] @runtime_checkable class Stoppable(Protocol): """ The Stoppable protocol defines the requirements for making a resource Stoppable. All resources that physically move should be Stoppable. """
[docs] def stop(self, *, extra: Optional[Mapping[str, Any]] = None, timeout: Optional[float] = None, **kwargs): ...