@@ -75,22 +75,22 @@ class MultiBar(typing.Dict[str, bar.ProgressBar]):
7575 _thread_closed : threading .Event = threading .Event ()
7676
7777 def __init__ (
78- self ,
79- bars : typing .Iterable [tuple [str , bar .ProgressBar ]] | None = None ,
80- fd : typing .TextIO = sys .stderr ,
81- prepend_label : bool = True ,
82- append_label : bool = False ,
83- label_format = '{label:20.20} ' ,
84- initial_format : str | None = '{label:20.20} Not yet started' ,
85- finished_format : str | None = None ,
86- update_interval : float = 1 / 60.0 , # 60fps
87- show_initial : bool = True ,
88- show_finished : bool = True ,
89- remove_finished : timedelta | float = timedelta (seconds = 3600 ),
90- sort_key : str | SortKey = SortKey .CREATED ,
91- sort_reverse : bool = True ,
92- sort_keyfunc : SortKeyFunc | None = None ,
93- ** progressbar_kwargs ,
78+ self ,
79+ bars : typing .Iterable [tuple [str , bar .ProgressBar ]] | None = None ,
80+ fd : typing .TextIO = sys .stderr ,
81+ prepend_label : bool = True ,
82+ append_label : bool = False ,
83+ label_format = '{label:20.20} ' ,
84+ initial_format : str | None = '{label:20.20} Not yet started' ,
85+ finished_format : str | None = None ,
86+ update_interval : float = 1 / 60.0 , # 60fps
87+ show_initial : bool = True ,
88+ show_finished : bool = True ,
89+ remove_finished : timedelta | float = timedelta (seconds = 3600 ),
90+ sort_key : str | SortKey = SortKey .CREATED ,
91+ sort_reverse : bool = True ,
92+ sort_keyfunc : SortKeyFunc | None = None ,
93+ ** progressbar_kwargs ,
9494 ):
9595 self .fd = fd
9696
@@ -197,11 +197,11 @@ def render(self, flush: bool = True, force: bool = False):
197197 self ._buffer .write ('\n ' )
198198
199199 for i , (previous , current ) in enumerate (
200- itertools .zip_longest (
201- self ._previous_output ,
202- output ,
203- fillvalue = '' ,
204- ),
200+ itertools .zip_longest (
201+ self ._previous_output ,
202+ output ,
203+ fillvalue = '' ,
204+ ),
205205 ):
206206 if previous != current or force : # pragma: no branch
207207 self .print (
@@ -218,10 +218,10 @@ def render(self, flush: bool = True, force: bool = False):
218218 self .flush ()
219219
220220 def _render_bar (
221- self ,
222- bar_ : bar .ProgressBar ,
223- now ,
224- expired ,
221+ self ,
222+ bar_ : bar .ProgressBar ,
223+ now ,
224+ expired ,
225225 ) -> typing .Iterable [str ]:
226226 def update (force = True , write = True ): # pragma: no cover
227227 self ._label_bar (bar_ )
@@ -242,21 +242,21 @@ def update(force=True, write=True): # pragma: no cover
242242 yield self .initial_format .format (label = bar_ .label )
243243
244244 def _render_finished_bar (
245- self ,
246- bar_ : bar .ProgressBar ,
247- now ,
248- expired ,
249- update ,
245+ self ,
246+ bar_ : bar .ProgressBar ,
247+ now ,
248+ expired ,
249+ update ,
250250 ) -> typing .Iterable [str ]:
251251 if bar_ not in self ._finished_at :
252252 self ._finished_at [bar_ ] = now
253253 # Force update to get the finished format
254254 update (write = False )
255255
256256 if (
257- self .remove_finished
258- and expired is not None
259- and expired >= self ._finished_at [bar_ ]
257+ self .remove_finished
258+ and expired is not None
259+ and expired >= self ._finished_at [bar_ ]
260260 ):
261261 del self [bar_ .label ]
262262 return
@@ -271,13 +271,13 @@ def _render_finished_bar(
271271 yield self .finished_format .format (label = bar_ .label )
272272
273273 def print (
274- self ,
275- * args ,
276- end = '\n ' ,
277- offset = None ,
278- flush = True ,
279- clear = True ,
280- ** kwargs ,
274+ self ,
275+ * args ,
276+ end = '\n ' ,
277+ offset = None ,
278+ flush = True ,
279+ clear = True ,
280+ ** kwargs ,
281281 ):
282282 '''
283283 Print to the progressbar stream without overwriting the progressbars.
0 commit comments