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.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import NamedTuple
from collections import namedtuple
ClusterMaterial = NamedTuple("ClusterMaterial", [
("guid", str),
("material", str),
("brand", str),
("version", int),
("color", str),
("density", str),
ClusterMaterial = namedtuple('ClusterMaterial', [
'guid', # Type: str
'material', # Type: str
'brand', # Type: str
'version', # Type: int
'color', # Type: str
'density' # Type: str
])
LocalMaterial = NamedTuple("LocalMaterial", [
("GUID", str),
("id", str),
("type", str),
("status", str),
("base_file", str),
("setting_version", int),
("version", int),
("name", str),
("brand", str),
("material", str),
("color_name", str),
("color_code", str),
("description", str),
("adhesion_info", str),
("approximate_diameter", str),
("properties", str),
("definition", str),
("compatible", str),
LocalMaterial = namedtuple('LocalMaterial', [
'GUID', # Type: str
'id', # Type: str
'type', # Type: str
'status', # Type: str
'base_file', # Type: str
'setting_version', # Type: int
'version', # Type: int
'name', # Type: str
'brand', # Type: str
'material', # Type: str
'color_name', # Type: str
'color_code', # Type: str
'description', # Type: str
'adhesion_info', # Type: str
'approximate_diameter', # Type: str
'properties', # Type: str
'definition', # Type: str
'compatible' # Type: str
])