Skip to content

Commit afae00c

Browse files
committed
fix(package_manager): Convert all non str in Option alias
Signed-off-by: Helio Chissini de Castro <helio.chissini.de.castro@cariad.technology>
1 parent 650e52a commit afae00c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "uv_build"
44

55
[project]
66
name = "python-ort"
7-
version = "0.4.2"
7+
version = "0.4.3"
88
description = "A Python Ort model serialization library"
99
readme = "README.md"
1010
license = "MIT"

src/ort/models/config/package_manager_configuration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class PackageManagerConfiguration(BaseModel):
2929

3030
@field_validator("options", mode="before")
3131
@classmethod
32-
def convert_bools_to_str(cls, value: Any) -> Any:
32+
def convert_to_str(cls, value: Any) -> Any:
3333
if not isinstance(value, dict):
3434
return value
35-
return {k: str(v).lower() if isinstance(v, bool) else v for k, v in value.items()}
35+
for key, item in value.items():
36+
return {k: str(v).lower() if not isinstance(v, str) else v for k, v in value.items()}

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)