diff --git a/cura/PrinterOutput/Peripheral.py b/cura/PrinterOutput/Peripheral.py index 27d127832b..4613506978 100644 --- a/cura/PrinterOutput/Peripheral.py +++ b/cura/PrinterOutput/Peripheral.py @@ -1,20 +1,19 @@ # Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from dataclasses import dataclass +@dataclass class Peripheral: """Data class that represents a peripheral for a printer. Output device plug-ins may specify that the printer has a certain set of peripherals. This set is then possibly shown in the interface of the monitor stage. + + Args: + type (string): A unique ID for the type of peripheral. + name (string): A human-readable name for the peripheral. """ - - def __init__(self, peripheral_type: str, name: str) -> None: - """Constructs the peripheral. - - :param peripheral_type: A unique ID for the type of peripheral. - :param name: A human-readable name for the peripheral. - """ - self.type = peripheral_type - self.name = name + type: str + name: str