kennethreitz / clint

Python Command-line Application Tools
http://pypi.python.org/pypi/clint/
ISC License
95 stars 19 forks source link

bug in progress.bar function #187

Open philippovmax opened 1 year ago

philippovmax commented 1 year ago

empty_char and filled_char parameters do not work in progress.bar functions. That's because inside it Bar class instance is initiated with BAR_EMPTY_CHAR and BAR_FILLED_CHAR constants instead of the passed arguments. So, it needs to be:

...
with Bar(label=label, width=width, hide=hide, empty_char=empty_char,
             filled_char=filled_char, expected_size=count, every=every) \
            as bar:
                for i, item in enumerate(it):
                yield item
                bar.show(i + 1)
...
philippovmax commented 1 year ago

This bug is in distribution package that comes with poetry from PyPI! poetry add clint installs version 0.5.1