Skip to content

Commit

Permalink
broken code in progress erxample
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jun 28, 2020
1 parent 95ee530 commit 41448fa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions rich/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,16 +794,16 @@ def process_renderables(

syntax = Syntax(
'''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
"""Iterate and generate a tup`le with a flag for last value."""
iter_values = iter(values)
try:
previous_value = next(iter_values)
except StopIteration:
return
for value in iter_values:
yield False, previous_value
previous_value = value
yield True, previous_value''',
"""Iterate and generate a tup`le with a flag for last value."""
iter_values = iter(values)
try:
previous_value = next(iter_values)
except StopIteration:
return
for value in iter_values:
yield False, previous_value
previous_value = value
yield True, previous_value''',
"python",
line_numbers=True,
)
Expand Down

0 comments on commit 41448fa

Please sign in to comment.