def update_format(cls): """reread json format file and update node tree""" if cls.curr_format_file is None: return text = cls.get_curr_format_text() try: cls.root_input_type = get_root_input_type_from_json(text) except Exception as e: from os.path import join file_name = join(cls.format_dir, cls.curr_format_file + ".json") cls._report_error("Can't parse format file: " + file_name , e) else: InfoTextGenerator.init(text) cls.autocomplete_helper.create_options(cls.root_input_type) cls.update()