Reverted models to namedtuples from collections because

NamedTuple is a Python3.6 feature
This commit is contained in:
Marijn Deé 2018-11-21 11:01:26 +01:00
parent 9e8be286af
commit 7b0f8882a2

View file

@ -1,33 +1,33 @@
# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
from typing import NamedTuple from collections import namedtuple
ClusterMaterial = NamedTuple("ClusterMaterial", [ ClusterMaterial = namedtuple('ClusterMaterial', [
("guid", str), 'guid', # Type: str
("material", str), 'material', # Type: str
("brand", str), 'brand', # Type: str
("version", int), 'version', # Type: int
("color", str), 'color', # Type: str
("density", str), 'density' # Type: str
]) ])
LocalMaterial = NamedTuple("LocalMaterial", [ LocalMaterial = namedtuple('LocalMaterial', [
("GUID", str), 'GUID', # Type: str
("id", str), 'id', # Type: str
("type", str), 'type', # Type: str
("status", str), 'status', # Type: str
("base_file", str), 'base_file', # Type: str
("setting_version", int), 'setting_version', # Type: int
("version", int), 'version', # Type: int
("name", str), 'name', # Type: str
("brand", str), 'brand', # Type: str
("material", str), 'material', # Type: str
("color_name", str), 'color_name', # Type: str
("color_code", str), 'color_code', # Type: str
("description", str), 'description', # Type: str
("adhesion_info", str), 'adhesion_info', # Type: str
("approximate_diameter", str), 'approximate_diameter', # Type: str
("properties", str), 'properties', # Type: str
("definition", str), 'definition', # Type: str
("compatible", str), 'compatible' # Type: str
]) ])