PlutoConfig

mail@pastecode.io avatar
unknown
plain_text
2 months ago
820 B
2
Indexable
Never
class PlutoConfig(abc.ABC):
    """
    An abstract class used for storing polling and translation configuration
    for a PlutoDevice. This class is meant to be subclassed to support
    different PlutoDevice subclasses' polling and translation requirements.
    """
    __slots__ = ("name", "version", "polling_template", "polling_volume", "translation_template")

    def __init__(
            self,
            name: str,
            version: str,
            polling_template: Any,
            translation_template: Optional[Any] = None
    ):
        self.name = name
        self.version = version
        self.polling_template = polling_template
        self.polling_volume: Optional[int] = None
        self.translation_template = translation_template


PlutoConfigT = TypeVar("PlutoConfigT", bound=PlutoConfig)
Leave a Comment