Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed May 2, 2024
1 parent 5a90a1d commit aeb754a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions cyclopts/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ def create_parameter_help_panel(

iparams, cparams = (list(x) for x in zip(*icparams))

def help_append(text, style=""):
if help_components:
text = " " + text
if style:
help_components.append((text, style))
else:
help_components.append(text)

for iparam, cparam in icparams:
assert cparam.name is not None
assert cparam.name_transform is not None
Expand All @@ -297,15 +305,6 @@ def create_parameter_help_panel(

help_components = []

def help_append(text, style=""):
nonlocal help_components
if help_components:
text = " " + text
if style:
help_components.append((text, style))
else:
help_components.append(text)

if cparam.help:
help_append(cparam.help)

Expand Down

0 comments on commit aeb754a

Please sign in to comment.