def _infer_numeric_or_str(value: str):
    """Convert value to an int, float or leave it as a string.

    :param value: The cli value to parse
    :returns: The value converted to int or float if possible
    """
    for func in (int, float):
        try:
            return func(value)
        except ValueError:
            continue
    return value