split_cli_args

Contents

split_cli_args#

tollan.utils.cli.split_cli_args(re_name: str, args: list[str]) tuple[list[str], list[str]][source]#

Split the args based on regex match of the arg name.

Parameters:
  • re_name (str) – Regex pattern to match argument names

  • args (list) – CLI arguments to split

Returns:

Tuple of (matched args, unmatched args)

Return type:

tuple[list, list]