Skip to content

Commit 6cb4b33

Browse files
committed
Use list_enum_values_for_annotation
1 parent f26c6f0 commit 6cb4b33

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/dstack/_internal/core/models/configurations.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from dstack._internal.core.models.services import AnyModel, OpenAIChatModel
3232
from dstack._internal.core.models.unix import UnixUser
3333
from dstack._internal.core.models.volumes import MountPoint, VolumeConfiguration, parse_mount_point
34-
from dstack._internal.utils.common import has_duplicates
34+
from dstack._internal.utils.common import has_duplicates, list_enum_values_for_annotation
3535
from dstack._internal.utils.json_schema import add_extra_schema_types
3636
from dstack._internal.utils.json_utils import (
3737
pydantic_orjson_dumps_with_indent,
@@ -143,8 +143,9 @@ class RepoSpec(CoreModel):
143143
RepoExistsAction,
144144
Field(
145145
description=(
146-
"The action to be taken if `path` exists and is not empty. One of: {}"
147-
).format(", ".join(f"`{action.value}`" for action in RepoExistsAction)),
146+
"The action to be taken if `path` exists and is not empty."
147+
f" One of: {list_enum_values_for_annotation(RepoExistsAction)}"
148+
),
148149
),
149150
] = RepoExistsAction.ERROR
150151

0 commit comments

Comments
 (0)