From 738f50c0c15351eb0e6beef885a66bc623a9ec4b Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 22 Jul 2022 05:48:23 +0000 Subject: [PATCH] Restyled by yapf --- tools/cgGen.py | 31 ++++++++----------------------- tools/csstosort.py | 3 ++- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/tools/cgGen.py b/tools/cgGen.py index 4a43e7b..5c441d8 100644 --- a/tools/cgGen.py +++ b/tools/cgGen.py @@ -7,33 +7,18 @@ with open("schemeGroups.js", "a") as f: for current_line in x: value = current_line.split("=>")[0].strip() varName = current_line.split("=>")[0].strip().replace("#", "") - if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip(): + if prev_line.split("=>")[0].strip() != current_line.split( + "=>")[0].strip(): if prevComparison != value[0:7]: groupNumber += 1 alphaValue = 0 - f.write( - "]\n\n// color group: " - + str(groupNumber) - + " | default color: " - + value - + "\nexport var cg" - + str(groupNumber) - + "_" - + varName - + " = [\n" - ) + f.write("]\n\n// color group: " + str(groupNumber) + + " | default color: " + value + "\nexport var cg" + + str(groupNumber) + "_" + varName + " = [\n") else: - f.write( - "]\n\n// color group: " - + str(groupNumber) - + " | default color: " - + value - + "\nexport var cg" - + str(groupNumber) - + "a_" - + value[7:9] - + " = [\n" - ) + f.write("]\n\n// color group: " + str(groupNumber) + + " | default color: " + value + "\nexport var cg" + + str(groupNumber) + "a_" + value[7:9] + " = [\n") f.write('"' + current_line.split("=>")[1].strip() + '",\n') prev_line = current_line prevComparison = value[0:7] diff --git a/tools/csstosort.py b/tools/csstosort.py index fe8fe57..618f330 100644 --- a/tools/csstosort.py +++ b/tools/csstosort.py @@ -3,7 +3,8 @@ with open("formatted.txt", "a") as f: prev_line = "" for current_line in x: - if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip(): + if prev_line.split("=>")[0].strip() != current_line.split( + "=>")[0].strip(): f.write("\n") f.write(current_line) prev_line = current_line