Skip to content

Commit

Permalink
Fix incorrect position for positional arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Merel Theisen <[email protected]>
  • Loading branch information
merelcht committed Jan 11, 2024
1 parent f485dfc commit 4613506
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kedro/framework/cli/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def setup(metadata: ProjectMetadata, /, args: Any, **kwargs: Any) -> None: # no
@click.pass_obj # this will pass the metadata as first argument
def jupyter_notebook(
metadata: ProjectMetadata,
env: str,
/,
env: str,
args: Any,
**kwargs: Any,
) -> None: # noqa: unused-argument
Expand All @@ -93,8 +93,8 @@ def jupyter_notebook(
@click.pass_obj # this will pass the metadata as first argument
def jupyter_lab(
metadata: ProjectMetadata,
env: str,
/,
env: str,
args: Any,
**kwargs: Any,
) -> None: # noqa: unused-argument
Expand Down
4 changes: 2 additions & 2 deletions kedro/framework/cli/micropkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ def micropkg() -> None:
@click.pass_obj # this will pass the metadata as first argument
def pull_package( # noqa: PLR0913
metadata: ProjectMetadata,
/,
package_path: str,
env: str,
alias: str,
destination: str,
fs_args: str,
all_flag: str,
/,
**kwargs: Any,
) -> None:
"""Pull and unpack a modular pipeline and other micro-packages in your project."""
Expand Down Expand Up @@ -332,12 +332,12 @@ def _package_micropkgs_from_manifest(metadata: ProjectMetadata) -> None:
@click.pass_obj # this will pass the metadata as first argument
def package_micropkg( # noqa: PLR0913
metadata: ProjectMetadata,
/,
module_path: str,
env: str,
alias: str,
destination: str,
all_flag: str,
/,
**kwargs: Any,
) -> None:
"""Package up a modular pipeline or micro-package as a Python source distribution."""
Expand Down
4 changes: 2 additions & 2 deletions kedro/framework/cli/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ def pipeline() -> None:
@click.pass_obj # this will pass the metadata as first argument
def create_pipeline(
metadata: ProjectMetadata,
/,
name: str,
template_path: Path,
skip_config: bool,
env: str,
/,
**kwargs: Any,
) -> None: # noqa: unused-argument
"""Create a new modular pipeline by providing a name."""
Expand Down Expand Up @@ -147,7 +147,7 @@ def create_pipeline(
)
@click.pass_obj # this will pass the metadata as first argument
def delete_pipeline(
metadata: ProjectMetadata, name: str, env: str, yes: bool, /, **kwargs: Any
metadata: ProjectMetadata, /, name: str, env: str, yes: bool, **kwargs: Any
) -> None: # noqa: unused-argument
"""Delete a modular pipeline by providing a name."""
package_dir = metadata.source_dir / metadata.package_name
Expand Down
2 changes: 1 addition & 1 deletion kedro/framework/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def project_group() -> None: # pragma: no cover
@forward_command(project_group, forward_help=True)
@env_option
@click.pass_obj # this will pass the metadata as first argument
def ipython(metadata: ProjectMetadata, env: str, /, args: Any, **kwargs: Any) -> None: # noqa: unused-argument
def ipython(metadata: ProjectMetadata, /, env: str, args: Any, **kwargs: Any) -> None: # noqa: unused-argument
"""Open IPython with project specific variables loaded."""
_check_module_importable("IPython")

Expand Down
2 changes: 1 addition & 1 deletion kedro/framework/cli/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def list_registered_pipelines() -> None:
@click.argument("name", nargs=1, default="__default__")
@click.pass_obj
def describe_registered_pipeline(
metadata: ProjectMetadata, name: str, /, **kwargs: Any
metadata: ProjectMetadata, /, name: str, **kwargs: Any
) -> None: # noqa: unused-argument, protected-access
"""Describe a registered pipeline by providing a pipeline name.
Defaults to the `__default__` pipeline.
Expand Down

0 comments on commit 4613506

Please sign in to comment.