From 3aa1b86ca613ee82be50f98d964dc760fef171f5 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 22 Jul 2022 05:48:00 +0000 Subject: [PATCH] Restyled by black --- tools/cgGen.py | 34 ++++++++++++++++++++++++++-------- tools/csstosort.py | 8 ++++---- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/tools/cgGen.py b/tools/cgGen.py index df7f20a..4a43e7b 100644 --- a/tools/cgGen.py +++ b/tools/cgGen.py @@ -1,7 +1,7 @@ -with open('schemeGroups.js', 'a') as f: - x = open('colors.txt', 'r') - prev_line = '' - prevComparison = '' +with open("schemeGroups.js", "a") as f: + x = open("colors.txt", "r") + prev_line = "" + prevComparison = "" groupNumber = 0 for current_line in x: @@ -11,11 +11,29 @@ with open('schemeGroups.js', 'a') as f: 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 9bb31e0..fe8fe57 100644 --- a/tools/csstosort.py +++ b/tools/csstosort.py @@ -1,10 +1,10 @@ -with open('formatted.txt', 'a') as f: - x = open('colors.txt', 'r') - prev_line = '' +with open("formatted.txt", "a") as f: + x = open("colors.txt", "r") + prev_line = "" for current_line in x: if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip(): - f.write('\n') + f.write("\n") f.write(current_line) prev_line = current_line