swh.alter.progressbar module#
- class swh.alter.progressbar.ProgressBar(*args, **kwargs)[source]#
-
Interface for the ProgressBar object, mimicking click’s.
- class swh.alter.progressbar.NoProgressBar(iterable: Iterable[V], label: str | None = None)[source]#
Bases:
Generic
[V
]A ProgressBar implementation that displays nothing.
Typically returned by
no_progressbar()
.
- class swh.alter.progressbar.ProgressBarInit(*args, **kwargs)[source]#
Bases:
Protocol
A protocol abstracting the
click.progressbar()
function.
- swh.alter.progressbar.no_progressbar(iterable: Iterable[V] | None = None, length: int | None = None, label: str | None = None, show_eta: bool = True, show_pos: bool = False, show_percent: bool | None = None, item_show_func: Callable[[V], str] | None = None) ProgressBar[V] [source]#
Returns a
ProgressBar
that displays nothing.This function allows to use the same code structure wherever a progressbar has to be displayed or not.