Skip to content

Commit 3ff11ee

Browse files
committed
fix lint
1 parent 4e01d82 commit 3ff11ee

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

centml/cli/shell.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
from centml.sdk import auth
1010
from centml.sdk.api import get_centml_client
1111
from centml.sdk.config import settings
12-
from centml.sdk.shell import PodNotFoundError, ShellError, build_ws_url, exec_session, get_running_pods, interactive_session
12+
from centml.sdk.shell import (
13+
PodNotFoundError,
14+
ShellError,
15+
build_ws_url,
16+
exec_session,
17+
get_running_pods,
18+
interactive_session,
19+
)
1320

1421

1522
def _resolve_pod(running_pods: list[str], pod_name: str) -> str:
@@ -20,16 +27,13 @@ def _resolve_pod(running_pods: list[str], pod_name: str) -> str:
2027
return pod_name
2128

2229

23-
2430
def _select_pod(running_pods, deployment_id):
2531
click.echo(f"Multiple running pods found for deployment {deployment_id}:")
2632
for i, name in enumerate(running_pods, 1):
2733
click.echo(f" [{i}] {name}")
2834

2935
choice = click.prompt(
30-
"Select a pod",
31-
type=click.IntRange(1, len(running_pods)),
32-
prompt_suffix=f" [1-{len(running_pods)}]: ",
36+
"Select a pod", type=click.IntRange(1, len(running_pods)), prompt_suffix=f" [1-{len(running_pods)}]: "
3337
)
3438
return running_pods[choice - 1]
3539

@@ -60,7 +64,9 @@ def _connect_args(deployment_id, pod, shell_type, first_pod=False):
6064
@click.argument("deployment_id", type=int)
6165
@click.option("--pod", default=None, help="Specify a pod name")
6266
@click.option("--shell", "shell_type", default=None, type=click.Choice(["bash", "sh", "zsh"]), help="Shell type")
63-
@click.option("--first-pod", is_flag=True, default=False, help="Auto-select the first running pod (skip interactive selection)")
67+
@click.option(
68+
"--first-pod", is_flag=True, default=False, help="Auto-select the first running pod (skip interactive selection)"
69+
)
6470
@handle_exception
6571
def shell(deployment_id, pod, shell_type, first_pod):
6672
if not sys.stdin.isatty():
@@ -76,7 +82,9 @@ def shell(deployment_id, pod, shell_type, first_pod):
7682
@click.argument("command", nargs=-1, required=True, type=click.UNPROCESSED)
7783
@click.option("--pod", default=None, help="Specific pod name")
7884
@click.option("--shell", "shell_type", default=None, type=click.Choice(["bash", "sh", "zsh"]), help="Shell type")
79-
@click.option("--first-pod", is_flag=True, default=False, help="Auto-select the first running pod (skip interactive selection)")
85+
@click.option(
86+
"--first-pod", is_flag=True, default=False, help="Auto-select the first running pod (skip interactive selection)"
87+
)
8088
@handle_exception
8189
def exec_cmd(deployment_id, command, pod, shell_type, first_pod):
8290
ws_url, token = _connect_args(deployment_id, pod, shell_type, first_pod)

tests/test_cli_shell.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from centml.sdk.shell.exceptions import PodNotFoundError
1010

11-
1211
# ===========================================================================
1312
# _resolve_pod
1413
# ===========================================================================

0 commit comments

Comments
 (0)