Repository: kedro-org/kedro
File: kedro/framework/cli/starters.py (Python)

Code before:
        extra_context["tools"] = tools

    if project_name is not None:
        extra_context["project_name"] = project_name

    # Map the selected tools lists to readable name
    tools = extra_context.get("tools")
    if tools:
        extra_context["tools"] = [
            NUMBER_TO_TOOLS_NAME[tool]
            for tool in _parse_tools_input(tools)  # type: ignore
        ]
        extra_context["tools"] = str(extra_context["tools"])

    extra_context["example_pipeline"] = (
        _parse_yes_no_to_bool(
            example_pipeline
            if example_pipeline is not None
            else extra_context.get("example_pipeline", "no")
        )  # type: ignore
    )

    return extra_context


def _convert_tools_names_to_numbers(selected_tools: str | None) -> str | None:
    """Prepares tools selection from the CLI input to the correct format
    to be put in the project configuration, if it exists.
    Replaces tool strings with the corresponding prompt number.

    Args:
        selected_tools: a string containing the value for the --tools flag,
            or None in case the flag wasn't used, i.e. lint,docs.

    Returns:
        String with the numbers corresponding to the desired tools, or
        None in case the --tools flag was not used.
    """
    if selected_tools is None:
        return None

    tools = []
    for tool in selected_tools.lower().split(","):
        tool_short_name = tool.strip()
        if tool_short_name in TOOLS_SHORTNAME_TO_NUMBER:
            tools.append(TOOLS_SHORTNAME_TO_NUMBER[tool_short_name])
    return ",".join(tools)


def _select_prompts_to_display(
    prompts_required: dict,

Review comment (suggestion):
Nit: 
```suggestion
def _convert_tool_names_to_numbers(selected_tools: str | None) -> str | None:
```

Code after:
        extra_context["tools"] = tools

    if project_name is not None:
        extra_context["project_name"] = project_name

    # Map the selected tools lists to readable name
    tools = extra_context.get("tools")
    if tools:
        extra_context["tools"] = [
            NUMBER_TO_TOOLS_NAME[tool]
            for tool in _parse_tools_input(tools)  # type: ignore
        ]
        extra_context["tools"] = str(extra_context["tools"])

    extra_context["example_pipeline"] = (
        _parse_yes_no_to_bool(
            example_pipeline
            if example_pipeline is not None
            else extra_context.get("example_pipeline", "no")
        )  # type: ignore
    )

    return extra_context


def _convert_tool_names_to_numbers(selected_tools: str | None) -> str | None:
    """Prepares tools selection from the CLI input to the correct format
    to be put in the project configuration, if it exists.
    Replaces tool strings with the corresponding prompt number.

    Args:
        selected_tools: a string containing the value for the --tools flag,
            or None in case the flag wasn't used, i.e. lint,docs.

    Returns:
        String with the numbers corresponding to the desired tools, or
        None in case the --tools flag was not used.
    """
    if selected_tools is None:
        return None

    tools = []
    for tool in selected_tools.lower().split(","):
        tool_short_name = tool.strip()
        if tool_short_name in TOOLS_SHORTNAME_TO_NUMBER:
            tools.append(TOOLS_SHORTNAME_TO_NUMBER[tool_short_name])
    return ",".join(tools)


def _select_prompts_to_display(
    prompts_required: dict,