@@ -516,9 +516,13 @@ def show_linter_violations(
516
516
pass
517
517
518
518
519
- def make_progress_bar (message : str , console : t .Optional [RichConsole ] = None ) -> Progress :
519
+ def make_progress_bar (
520
+ message : str ,
521
+ console : t .Optional [RichConsole ] = None ,
522
+ justify : t .Literal ["default" , "left" , "center" , "right" , "full" ] = "right" ,
523
+ ) -> Progress :
520
524
return Progress (
521
- TextColumn (f"[bold blue]{ message } " , justify = "right" ),
525
+ TextColumn (f"[bold blue]{ message } " , justify = justify ),
522
526
BarColumn (bar_width = PROGRESS_BAR_WIDTH ),
523
527
"[progress.percentage]{task.percentage:>3.1f}%" ,
524
528
"•" ,
@@ -799,16 +803,8 @@ def start_promotion_progress(
799
803
) -> None :
800
804
"""Indicates that a new snapshot promotion progress has begun."""
801
805
if self .promotion_progress is None :
802
- self .promotion_progress = Progress (
803
- TextColumn (
804
- "[bold blue]Updating virtual layer " , # space to align with other progress bars
805
- justify = "right" ,
806
- ),
807
- BarColumn (bar_width = PROGRESS_BAR_WIDTH ),
808
- "[progress.percentage]{task.percentage:>3.1f}%" ,
809
- "•" ,
810
- TimeElapsedColumn (),
811
- console = self .console ,
806
+ self .promotion_progress = make_progress_bar (
807
+ "Updating virtual layer " , self .console , justify = "left"
812
808
)
813
809
814
810
self .promotion_progress .start ()
0 commit comments