Skip to content

Commit 360bf2e

Browse files
committed
precommit
1 parent 5f95581 commit 360bf2e

File tree

17 files changed

+43
-29
lines changed

17 files changed

+43
-29
lines changed

docs/cli_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ $ llama-stack-client shields list
123123
+==============+==========+================+=============+
124124
| llama_guard | {} | meta-reference | llama_guard |
125125
+--------------+----------+----------------+-------------+
126-
```
126+
```

src/llama_stack_client/lib/.keep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
File generated from our OpenAPI spec by Stainless.
22

33
This directory can be used to store custom files to expand the SDK.
4-
It is ignored by Stainless code generation and its content (other than this keep file) won't be touched.
4+
It is ignored by Stainless code generation and its content (other than this keep file) won't be touched.

src/llama_stack_client/lib/cli/configure.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
# the root directory of this source tree.
66

77
import os
8+
89
import click
910
import yaml
10-
from llama_stack_client.lib.cli.constants import get_config_file_path, LLAMA_STACK_CLIENT_CONFIG_DIR
1111
from prompt_toolkit import prompt
1212
from prompt_toolkit.validation import Validator
1313

14+
from llama_stack_client.lib.cli.constants import get_config_file_path, LLAMA_STACK_CLIENT_CONFIG_DIR
15+
1416

1517
def get_config():
1618
config_file = get_config_file_path()

src/llama_stack_client/lib/cli/datasets/datasets.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7+
import json
8+
from typing import Optional
9+
710
import click
811
import yaml
9-
from typing import Optional
10-
import json
1112

12-
from llama_models.llama3.api.datatypes import URL
1313
from .list import list_datasets
1414

1515

@@ -41,14 +41,14 @@ def register(
4141

4242
try:
4343
dataset_schema = json.loads(schema)
44-
except json.JSONDecodeError:
45-
raise click.BadParameter("Schema must be valid JSON")
44+
except json.JSONDecodeError as err:
45+
raise click.BadParameter("Schema must be valid JSON") from err
4646

4747
if metadata:
4848
try:
4949
metadata = json.loads(metadata)
50-
except json.JSONDecodeError:
51-
raise click.BadParameter("Metadata must be valid JSON")
50+
except json.JSONDecodeError as err:
51+
raise click.BadParameter("Metadata must be valid JSON") from err
5252

5353
response = client.datasets.register(
5454
dataset_id=dataset_id,

src/llama_stack_client/lib/cli/datasets/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# the root directory of this source tree.
66

77
import click
8-
from rich.table import Table
98
from rich.console import Console
9+
from rich.table import Table
1010

1111

1212
@click.command("list")

src/llama_stack_client/lib/cli/eval_tasks/eval_tasks.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
# the root directory of this source tree.
66

77

8-
import click
98
import json
10-
import yaml
119
from typing import Optional
1210

11+
import click
12+
import yaml
13+
1314
from .list import list_eval_tasks
1415

1516

@@ -42,8 +43,8 @@ def register(
4243
if metadata:
4344
try:
4445
metadata = json.loads(metadata)
45-
except json.JSONDecodeError:
46-
raise click.BadParameter("Metadata must be valid JSON")
46+
except json.JSONDecodeError as err:
47+
raise click.BadParameter("Metadata must be valid JSON") from err
4748

4849
response = client.eval_tasks.register(
4950
eval_task_id=eval_task_id,

src/llama_stack_client/lib/cli/eval_tasks/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# the root directory of this source tree.
66

77
import click
8-
from rich.table import Table
98
from rich.console import Console
9+
from rich.table import Table
1010

1111

1212
@click.command("list")

src/llama_stack_client/lib/cli/llama_stack_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
import click
88
import yaml
9+
910
from llama_stack_client import LlamaStackClient
11+
from .configure import configure
1012

1113
from .constants import get_config_file_path
12-
from .configure import configure
1314
from .datasets import datasets
1415
from .eval_tasks import eval_tasks
1516
from .memory_banks import memory_banks

src/llama_stack_client/lib/cli/memory_banks/memory_banks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7-
import click
87
from typing import Optional
8+
9+
import click
910
import yaml
10-
from rich.table import Table
1111
from rich.console import Console
12+
from rich.table import Table
1213

1314

1415
@click.group()

src/llama_stack_client/lib/cli/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
# the root directory of this source tree.
66

77
from .models import models
8+
9+
__all__ = ["models"]

0 commit comments

Comments
 (0)