Rockhopper-Technologies / enlighten

Enlighten Progress Bar for Python Console Apps
https://python-enlighten.readthedocs.io
Mozilla Public License 2.0
416 stars 25 forks source link

Doc talks about "manager"'s counter but then uses module-level function #63

Closed raffaem closed 1 year ago

raffaem commented 1 year ago

docs says:

For a basic progress bar, invoke the Manager.counter method.

But in the example it calls a module-level function, not the manager's one:

import enlighten
[...]
manager = enlighten.get_manager()
pbar = enlighten.counter(total=100, desc='Basic', unit='ticks')

In the next example, the manager's functions are instead called:

import time
import enlighten
[...]
manager = enlighten.get_manager()
ticks = manager.counter(total=100, desc='Ticks', unit='ticks')
tocks = manager.counter(total=20, desc='Tocks', unit='tocks')
avylove commented 1 year ago

Thanks for reporting! Looks like a change in Read the Docs also broke document building since the last release. Both issues fixed as of 1.12.2.