Skip to content

Commit bade8f9

Browse files
committed
Updated the code according to flake8.
1 parent 7026fef commit bade8f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

color_palette_generator/main.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from flask import Flask, render_template, request
22
import random
33

4+
45
app = Flask(__name__)
56

7+
68
# Function to generate random color palette
79
def generate_color_palette(num_colors=5):
810
colors = []
@@ -11,6 +13,7 @@ def generate_color_palette(num_colors=5):
1113
colors.append(color)
1214
return colors
1315

16+
1417
# Home route to display the color palette generator
1518
@app.route('/', methods=['GET', 'POST'])
1619
def home():
@@ -21,5 +24,7 @@ def home():
2124
color_palette = generate_color_palette() # Default palette with 5 colors
2225
return render_template('index.html', color_palette=color_palette)
2326

27+
2428
if __name__ == '__main__':
2529
app.run(debug=True)
30+

0 commit comments

Comments
 (0)