From ddf5ab04944019e4f89ee2a5b334fa5f05cc9f72 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 Nov 2017 14:52:57 +0100 Subject: [PATCH] Make _parseCompatibleValue a class method It might as well be static, since it doesn't need an instance. Contributes to issue CURA-4243. --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index dec988ad15..1583ba9212 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -667,7 +667,8 @@ class XmlMaterialProfile(InstanceContainer): return json.load(f) ## Parse the value of the "material compatible" property. - def _parseCompatibleValue(self, value: str): + @classmethod + def _parseCompatibleValue(cls, value: str): return value in {"yes", "unknown"} # Map XML file setting names to internal names