src/orion/core/io/orion_cmdline_parser.py
def _replace_priors(args):
        """Change directly name priors to more general form.

        Pass through the current commandline arguments and replace priors of the form
        `--<name>~<prior>` to the more general one `--<name> orion~<prior>` to stay consistent
        with parameters passed as list.

        Parameters
        ----------
        args: list
            A list of the current commandline arguments.

        Returns
        -------
        list
            A list composed of the same elements as `args` augmented with the new form
            of the priors.

        """
        replaced = []
        for item in args:
            if item.startswith("-"):
                # Get the prior part after the `~`
                parts = item.split("~")

                if len(parts) > 1 and _is_nonprior_wave(parts[1]):
                    replaced.append(item)
                    continue

                # If the argument was defined has a long one but only has a single letter
                # then it needs to be shortened.
                if parts[0].startswith("--") and len(parts[0]) == 3:
                    parts[0] = parts[0][1:]

                replaced.append(parts[0])

                if len(parts) > 1:
                    replaced.append("orion~" + parts[1])
            else:
                replaced.append(item)

        return replaced
Change directly name priors to more general form.

        Pass through the current commandline arguments and replace priors of the form
        `--<name>~<prior>` to the more general one `--<name> orion~<prior>` to stay consistent
        with parameters passed as list.

        Parameters
        ----------
        args: list
            A list of the current commandline arguments.

        Returns
        -------
        list
            A list composed of the same elements as `args` augmented with the new form
            of the priors.

        
Change directly name priors to more general form.
Pass through the current commandline arguments and replace priors of the form
`--~` to the more general one `-- orion~` to stay consistent
with parameters passed as list.

Parameters

list
A list of the current commandline arguments.

Returns

list
A list composed of the same elements as `args` augmented with the new form
of the priors.
Change directly name priors to more general form . Pass through the current commandline arguments and replace priors of the form ` -- ~ ` to the more general one ` -- orion~ ` to stay consistent with parameters passed as list . Parameters list A list of the current commandline arguments . Returns list A list composed of the same elements as ` args ` augmented with the new form of the priors .
def _replace_priors(args):
        replaced = []
        for item in args:
            if item.startswith("-"):
                parts = item.split("~")
                if len(parts) > 1 and _is_nonprior_wave(parts[1]):
                    replaced.append(item)
                    continue
                if parts[0].startswith("--") and len(parts[0]) == 3:
                    parts[0] = parts[0][1:]
                replaced.append(parts[0])
                if len(parts) > 1:
                    replaced.append("orion~" + parts[1])
            else:
                replaced.append(item)
        return replaced
def _replace_priors ( args ) : replaced = [ ] for item in args : if item . startswith ( "-" ) : parts = item . split ( "~" ) if len ( parts ) > 1 and _is_nonprior_wave ( parts [ 1 ] ) : replaced . append ( item ) continue if parts [ 0 ] . startswith ( "--" ) and len ( parts [ 0 ] ) == 3 : parts [ 0 ] = parts [ 0 ] [ 1 : ] replaced . append ( parts [ 0 ] ) if len ( parts ) > 1 : replaced . append ( "orion~" + parts [ 1 ] ) else : replaced . append ( item ) return replaced
Change directly name priors to more general form.
Change directly name priors to more general form .
"""Change directly name priors to more general form.

        Pass through the current commandline arguments and replace priors of the form
        `--<name>~<prior>` to the more general one `--<name> orion~<prior>` to stay consistent
        with parameters passed as list.

        Parameters
        ----------
        args: list
            A list of the current commandline arguments.

        Returns
        -------
        list
            A list composed of the same elements as `args` augmented with the new form
            of the priors.

        """ # Get the prior part after the `~` # If the argument was defined has a long one but only has a single letter # then it needs to be shortened.
args