Skip to content

Commit 4eb06b4

Browse files
committed
Update Process enum __str__ method to return the enum value instead of name
1 parent 3048db3 commit 4eb06b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

chipflow_lib/platforms/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Process(enum.Enum):
404404
IHP_SG13G2 = "ihp_sg13g2"
405405

406406
def __str__(self):
407-
return f'{self.name}'
407+
return f'{self.value}'
408408

409409

410410
class LockFile(pydantic.BaseModel):

tests/test_parse_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_example_config_parsing(self):
2525
config = Config.model_validate(config_dict)
2626
self.assertEqual(config.chipflow.project_name, "test-chip")
2727
self.assertEqual(config.chipflow.silicon.package, "pga144")
28-
self.assertEqual(str(config.chipflow.silicon.process), "GF130BCD")
28+
self.assertEqual(str(config.chipflow.silicon.process), "gf130bcd")
2929

3030
def test_mock_config_parsing(self):
3131
"""Test that the mock chipflow.toml can be parsed with our Pydantic models."""

0 commit comments

Comments
 (0)