From 64e3ce72df82214a43d6ad06126f561c45c49d66 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 27 Jul 2023 10:27:47 +0000 Subject: [PATCH] Restyled by autopep8 --- scripts/tools/generate_esp32_chip_factory_bin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tools/generate_esp32_chip_factory_bin.py b/scripts/tools/generate_esp32_chip_factory_bin.py index 700ebebd7c0fe7..415e845a56c3f8 100755 --- a/scripts/tools/generate_esp32_chip_factory_bin.py +++ b/scripts/tools/generate_esp32_chip_factory_bin.py @@ -235,6 +235,7 @@ def get_fixed_label_dict(fixed_labels): # input : ['0/label1/1 1/label2/1'] # outout : {'1': [{'Label': 'label1', 'Mode': 0, 'Semantic_Tag': []}, {'Label': 'label2', 'Mode': 1, 'Semantic_Tag': []}]} + def get_supported_modes_dict(supported_modes): output_dict = {} @@ -245,7 +246,7 @@ def get_supported_modes_dict(supported_modes): ep = mode_label_strs[2] semantic_tags = '' - if (len(mode_label_strs) is 4): + if (len(mode_label_strs) == 4): semantic_tag_strs = mode_label_strs[3].split(', ') semantic_tags = [{"value": int(v.split('\\')[0]), "mfgCode": int(v.split('\\')[1], 16)} for v in semantic_tag_strs]