chore variable name

pull/7/head
ERR0RPR0MPT 2024-04-16 06:15:39 +08:00
parent 55a27dbf4c
commit 44ca6db3a2
1 changed files with 5 additions and 5 deletions

10
main.py
View File

@ -200,8 +200,8 @@ def get_color_name(pixel):
def convert(touch_data): def convert(touch_data):
copy_exp_list = copy.deepcopy(exp_list) copy_exp_list = copy.deepcopy(exp_list)
touch_keys = {exp_image_dict[r_str] for i in touch_data if i["p"] for r_str in get_colors_in_area(i["x"], i["y"]) if touch_keys = {exp_image_dict[rgb_str] for i in touch_data if i["p"] for rgb_str in get_colors_in_area(i["x"], i["y"]) if
r_str in exp_image_dict} rgb_str in exp_image_dict}
# print("Touch Keys:", touch_keys) # print("Touch Keys:", touch_keys)
# touched = sum(1 for i in touch_data if i["p"]) # touched = sum(1 for i in touch_data if i["p"])
# print("Touched:", touched) # print("Touched:", touched)
@ -221,10 +221,10 @@ def convert(touch_data):
# touched += 1 # touched += 1
# x = i["x"] # x = i["x"]
# y = i["y"] # y = i["y"]
# for r_str in get_colors_in_area(x, y): # for rgb_str in get_colors_in_area(x, y):
# if not r_str in exp_image_dict: # if not rgb_str in exp_image_dict:
# continue # continue
# touch_keys.add(exp_image_dict[r_str]) # touch_keys.add(exp_image_dict[rgb_str])
# # print("Touched:", touched) # # print("Touched:", touched)
# # print("Touch Keys:", touch_keys) # # print("Touch Keys:", touch_keys)
# touch_keys_list = list(touch_keys) # touch_keys_list = list(touch_keys)