Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsalmei committed Mar 25, 2021
1 parent 616c8e8 commit bab04d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alive_progress/animations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def sliding_window():
adjusted_sep = fix_cells((sep * math.ceil(gap / len(sep)))[:gap]) if gap else ''
content = tuple(chain.from_iterable(chain.from_iterable(zip(repeat(adjusted_sep), contents))))
original, step = len(content), -1 if right else 1
assert length <= original, 'window slides inside content, length must be <= len(content)'
assert length <= original, f'window slides inside content, {length} must be <= {original}'
content += content[:length]
return sliding_window()

Expand Down
1 change: 1 addition & 0 deletions alive_progress/styles/exhibit.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def showtime(show=Show.SPINNERS, *, fps=None, length=None, pattern=None):
Show.BARS: show_bars,
Show.THEMES: show_themes,
}
assert show in show_funcs, 'Which show do you want? Try Show.SPINNERS for example.'
show_funcs[show](fps=fps, length=length, pattern=pattern)


Expand Down

0 comments on commit bab04d4

Please sign in to comment.