Skip to content

Commit 57ba337

Browse files
fix: include v
1 parent a322f6e commit 57ba337

File tree

1 file changed

+7
-6
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver

1 file changed

+7
-6
lines changed

packages/models-library/src/models_library/api_schemas_webserver/storage.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
MIN_NON_WILDCARD_CHARS: Final[int] = 3
1515

16+
1617
class StorageLocationPathParams(BaseModel):
1718
location_id: LocationID
1819

@@ -49,16 +50,16 @@ def validate_pattern_has_enough_characters(v: str) -> str:
4950
non_wildcard_chars = len([c for c in v if c not in ("*", "?")])
5051

5152
if non_wildcard_chars < MIN_NON_WILDCARD_CHARS:
52-
msg = f"Name pattern must contain at least {MIN_NON_WILDCARD_CHARS} non-wildcard characters (not * or ?), got {non_wildcard_chars}"
53+
msg = f"Name pattern {v} must contain at least {MIN_NON_WILDCARD_CHARS} non-wildcard characters (not * or ?), got {non_wildcard_chars}"
5354
raise ValueError(msg)
5455
return v
5556

5657

5758
class SearchBodyParams(InputSchema):
5859
name_pattern: Annotated[
59-
str,
60-
BeforeValidator(validate_pattern_has_enough_characters),
61-
Field(
62-
description="Name pattern with wildcard support (* and ?). Minimum of {MIN_NON_WILDCARD_CHARS} non-wildcard characters required.",
63-
)
60+
str,
61+
BeforeValidator(validate_pattern_has_enough_characters),
62+
Field(
63+
description="Name pattern with wildcard support (* and ?). Minimum of {MIN_NON_WILDCARD_CHARS} non-wildcard characters required.",
64+
),
6465
]

0 commit comments

Comments
 (0)