def _get_create_resources()

in cli/src/klio_cli/commands/job/create.py [0:0]


    def _get_create_resources(self, kwargs, user_input=False):
        if "create_resources" in kwargs:
            create_resources = kwargs.get("create_resources")
            if create_resources:
                create_resources = str(create_resources).lower() in (
                    "y",
                    "true",
                    "yes",
                )
            else:  # then it was used as a flag
                create_resources = True
        else:
            if user_input:
                create_resources = click.prompt(
                    "Create relevant resources in GCP? [Y/n]",
                    type=click.Choice(["y", "Y", "n", "N"]),
                    default="n"
                    if DEFAULTS["create_resources"] is False
                    else "y",
                    show_choices=False,
                    show_default=False,  # shown in prompt
                )
                create_resources = create_resources.lower() == "y"
            else:
                create_resources = DEFAULTS["create_resources"]

        return create_resources