Skip to content

Commit

Permalink
Avoid merge conflict with 3490
Browse files Browse the repository at this point in the history
Signed-off-by: Ahdra Merali <[email protected]>
  • Loading branch information
Ahdra Merali committed Jan 10, 2024
1 parent 5500b95 commit b2d92f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kedro/framework/cli/starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class KedroStarterSpec: # noqa: too-few-public-methods
}


def _validate_flag_inputs(flag_inputs):
def _validate_flag_inputs(flag_inputs: dict[str, Any]):
if flag_inputs.get("checkout") and not flag_inputs.get("starter"):
raise KedroCliError("Cannot use the --checkout flag without a --starter value.")

Expand Down Expand Up @@ -205,7 +205,7 @@ def _validate_selected_tools(selected_tools):
sys.exit(1)


def _print_tools_selection(selected_tools):
def _print_tools_selection(selected_tools: str | None):
if selected_tools is not None:
if selected_tools == "['None']":
click.secho(
Expand All @@ -219,7 +219,7 @@ def _print_tools_selection(selected_tools):
)


def _print_example_selection(example_pipeline):
def _print_example_selection(example_pipeline: bool | None):
if example_pipeline is not None:
if example_pipeline:
click.secho(
Expand Down Expand Up @@ -321,7 +321,7 @@ def new( # noqa: PLR0913
extra_context = _get_extra_context(
prompts_required=prompts_required,
config_path=config_path,
cookiecutter_context=cookiecutter_context,
cookiecutter_context=cookiecutter_context, # type: ignore
selected_tools=selected_tools,
project_name=project_name,
example_pipeline=example_pipeline,
Expand All @@ -343,7 +343,7 @@ def new( # noqa: PLR0913

# When not a starter, print tools and example selection
_print_tools_selection(extra_context.get("tools"))
_print_example_selection(extra_context.get("example_pipeline"))
_print_example_selection(extra_context.get("example_pipeline")) # type: ignore

# If interactive flow used, print hint
if prompts_required and not config_path:
Expand Down
2 changes: 2 additions & 0 deletions tests/framework/cli/test_starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def _assert_template_ok(

if "y" in example_pipeline.lower():
assert "It has been created with an example pipeline." in result.output
else:
assert "It has been created with an example pipeline." not in result.output

generated_files = [
p for p in full_path.rglob("*") if p.is_file() and p.name != ".DS_Store"
Expand Down

0 comments on commit b2d92f5

Please sign in to comment.