with click.progressbar(length=5) as progress_bar:
progress_bar.update(0)
This throws a float division by zero error, which I believe is caused by this line here.
The reason I ran into this is because I'm trying to use progressbar to track the status of remote resources which do work at unpredictable intervals. I pass in something like work_remaining_start - work_remaining_end to progress_bar.update() in a loop that periodically checks these remote resources, and sometimes this difference is 0.
Does it make sense for update() to accept a step of 0?
This throws a
float division by zeroerror, which I believe is caused by this line here.The reason I ran into this is because I'm trying to use
progressbarto track the status of remote resources which do work at unpredictable intervals. I pass in something likework_remaining_start - work_remaining_endtoprogress_bar.update()in a loop that periodically checks these remote resources, and sometimes this difference is 0.Does it make sense for
update()to accept a step of 0?