Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Petrov <[email protected]>
  • Loading branch information
wckdman committed Apr 14, 2023
1 parent 1dbb4d4 commit 2bdd426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion flytekit/clis/sdk_in_container/launchplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
5 changes: 2 additions & 3 deletions tests/flytekit/unit/cli/pyflyte/test_launchplan.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
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)
@pytest.mark.parametrize(
("action", "expected_state"),
[
("activate", "ACTIVE"),
("deactivate", "INACTIVE")
("deactivate", "INACTIVE"),
],
)
def test_pyflyte_launchplan(mock_remote, action, expected_state):
Expand Down

0 comments on commit 2bdd426

Please sign in to comment.