Fix false warnings on setting formulas

We also need to consider the extruder settings when looking into formulas for existing values.
This commit is contained in:
Erwan MATHIEU 2024-06-28 15:36:10 +02:00
parent 5f49492735
commit 9e2c440097

View File

@ -51,9 +51,17 @@ class Formulas(Linter):
self._definition = {} self._definition = {}
def getCuraSettingList(self) -> list: def getCuraSettingList(self) -> list:
settings_list = []
with open(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "resources", "definitions", "fdmprinter.def.json")) as data: with open(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "resources", "definitions", "fdmprinter.def.json")) as data:
json_data = json.load(data) json_data = json.load(data)
return self.extractKeys(json_data) settings_list += self.extractKeys(json_data)
with open(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "resources", "definitions", "fdmextruder.def.json")) as data:
json_data = json.load(data)
settings_list += self.extractKeys(json_data)
return settings_list
def extractKeys(self, json_obj, parent_key=''): def extractKeys(self, json_obj, parent_key=''):
keys_with_value = [] keys_with_value = []