diff --git a/flytekit/clis/sdk_in_container/launchplan.py b/flytekit/clis/sdk_in_container/launchplan.py index aa99067313..7a8bbb6926 100644 --- a/flytekit/clis/sdk_in_container/launchplan.py +++ b/flytekit/clis/sdk_in_container/launchplan.py @@ -66,6 +66,9 @@ def launchplan( ) state = LaunchPlanState.ACTIVE if activate else LaunchPlanState.INACTIVE remote.client.update_launch_plan(id=launchplan.id, state=state) - click.secho(f"\n Launchplan was set to {LaunchPlanState.enum_to_string(state)}: {launchplan.name}:{launchplan.id.version}", fg="green") + click.secho( + f"\n Launchplan was set to {LaunchPlanState.enum_to_string(state)}: {launchplan.name}:{launchplan.id.version}", + fg="green", + ) except StopIteration as e: click.secho(f"{e.value}", fg="red") diff --git a/tests/flytekit/unit/cli/pyflyte/test_launchplan.py b/tests/flytekit/unit/cli/pyflyte/test_launchplan.py index 07bea8eb8c..1a461bfd35 100644 --- a/tests/flytekit/unit/cli/pyflyte/test_launchplan.py +++ b/tests/flytekit/unit/cli/pyflyte/test_launchplan.py @@ -1,10 +1,9 @@ +import pytest from click.testing import CliRunner from mock import mock from flytekit.clis.sdk_in_container import pyflyte from flytekit.remote import FlyteRemote -import pytest - @mock.patch("flytekit.clis.sdk_in_container.helpers.FlyteRemote", spec=FlyteRemote) @@ -12,7 +11,7 @@ ("action", "expected_state"), [ ("activate", "ACTIVE"), - ("deactivate", "INACTIVE") + ("deactivate", "INACTIVE"), ], ) def test_pyflyte_launchplan(mock_remote, action, expected_state):