The progressbar documentation says:
:param file: the file to write to. If this is not a terminal then
only the label is printed.
However, this is no longer the case with newer click versions. Take the following test script:
#!/usr/bin/env python3
import click
from time import sleep
with click.progressbar(range(100), label="Foo") as pb:
for _ in pb:
sleep(0.01)
In click 5.0:
$ ./ayy.py
Foo [####################################] 100%
$ echo "$(./ayy.py)"
Foo
Foo
In click 7.0:
$ ./ayy.py
Foo [####################################] 100%
$ echo "$(./ayy.py)"
The progressbar documentation says:
However, this is no longer the case with newer click versions. Take the following test script:
In click 5.0:
In click 7.0: