Skip to content

Commit

Permalink
Fix the indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Dec 8, 2023
1 parent f9b147e commit 8fde78e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions fc-solve/site/wml/bin/gen_listboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,39 @@
'</div>'
)


def _gen_options(start, end):
"""docstring for _gen_options"""
return ''.join(
['<option value="{num}">{num}</option>'.format(num=num)
for num in range(start, end+1)])
['<option value="{num}">{num}</option>'.format(num=num)
for num in range(start, end+1)]
)


fc_listbox_id = "num_freecells"
fc_listbox = (listbox_template).format(
id=fc_listbox_id,
label_text='Freecells Number:',
options=_gen_options(start=0, end=8))
options=_gen_options(start=0, end=8)
)

cols_listbox_id = "num_columns"
cols_listbox = (listbox_template).format(
id=cols_listbox_id,
label_text='Columns Number:',
options=_gen_options(start=1, end=12))
options=_gen_options(start=1, end=12)
)


def out(out_fn, text):
"""docstring for out"""
with open(out_fn, 'wt') as f:
f.write(text)


def o_htmlish(base, text):
return out('lib/' + base + '.htmlish', text)


o_htmlish('fc_listbox', fc_listbox)
o_htmlish('cols_listbox', cols_listbox)

0 comments on commit 8fde78e

Please sign in to comment.