@@ -238,8 +238,8 @@ def apply_configuration(
238238 reattach = True
239239 break
240240 if run .status .is_finished ():
241- _print_finished_message (run )
242- exit (_get_run_exit_code (run ))
241+ print_finished_message (run )
242+ exit (get_run_exit_code (run ))
243243 time .sleep (1 )
244244 if not reattach :
245245 console .print (
@@ -439,7 +439,7 @@ def apply_args(
439439 ):
440440 super ().apply_args (conf , args , unknown )
441441 if args .ports :
442- conf .ports = list (merge_ports (conf .ports , args .ports ).values ())
442+ conf .ports = list (_merge_ports (conf .ports , args .ports ).values ())
443443
444444
445445class TaskConfigurator (RunWithPortsConfigurator ):
@@ -475,17 +475,17 @@ def apply_args(self, conf: ServiceConfiguration, args: argparse.Namespace, unkno
475475 self .interpolate_run_args (conf .commands , unknown )
476476
477477
478- def merge_ports (conf : List [PortMapping ], args : List [PortMapping ]) -> Dict [int , PortMapping ]:
479- unique_ports_constraint ([pm .container_port for pm in conf ])
480- unique_ports_constraint ([pm .container_port for pm in args ])
478+ def _merge_ports (conf : List [PortMapping ], args : List [PortMapping ]) -> Dict [int , PortMapping ]:
479+ _unique_ports_constraint ([pm .container_port for pm in conf ])
480+ _unique_ports_constraint ([pm .container_port for pm in args ])
481481 ports = {pm .container_port : pm for pm in conf }
482482 for pm in args : # override conf
483483 ports [pm .container_port ] = pm
484- unique_ports_constraint ([pm .local_port for pm in ports .values () if pm .local_port is not None ])
484+ _unique_ports_constraint ([pm .local_port for pm in ports .values () if pm .local_port is not None ])
485485 return ports
486486
487487
488- def unique_ports_constraint (ports : List [int ]):
488+ def _unique_ports_constraint (ports : List [int ]):
489489 used_ports = set ()
490490 for i in ports :
491491 if i in used_ports :
@@ -514,7 +514,7 @@ def _print_service_urls(run: Run) -> None:
514514 console .print ()
515515
516516
517- def _print_finished_message (run : Run ):
517+ def print_finished_message (run : Run ):
518518 if run .status == RunStatus .DONE :
519519 console .print ("[code]Done[/]" )
520520 return
@@ -542,7 +542,7 @@ def _print_finished_message(run: Run):
542542 console .print (f"[error]{ message } [/]" )
543543
544544
545- def _get_run_exit_code (run : Run ) -> int :
545+ def get_run_exit_code (run : Run ) -> int :
546546 if run .status == RunStatus .DONE :
547547 return 0
548548 return 1
0 commit comments