File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class IOModel(TypedDict):
8888 """
8989
9090 width : NotRequired [int ]
91- direction : NotRequired [Annotated [io .Direction , PlainSerializer (lambda x : str ( x ) )]]
91+ direction : NotRequired [Annotated [io .Direction , PlainSerializer (lambda x : x . value )]]
9292 all_have_oe : NotRequired [bool ]
9393 allocate_power : NotRequired [bool ]
9494 power_voltage : NotRequired [VoltageRange ]
Original file line number Diff line number Diff line change 2525DEFAULT_PINLOCK = {
2626 "process" : "ihp_sg13g2" ,
2727 "package" : {
28- "package_type" : "QuadPackageDef" ,
29- "name" : "pga144" ,
30- "width" : 36 ,
31- "height" : 36
28+ "type" : {
29+ "name" : "pga144" ,
30+ "package_type" : "QuadPackageDef" ,
31+ "width" : 36 ,
32+ "height" : 36 ,
33+ }
3234 },
3335 "port_map" : {},
3436 "metadata" : {},
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def test_pin_signature_annotations():
6767
6868 assert pin_annotation is not None
6969 json_data = pin_annotation .as_json ()
70- assert json_data ["direction" ] == io . Direction . Input
70+ assert json_data ["direction" ] == 'i'
7171 assert json_data ["width" ] == 16
7272
7373
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def test_pin_signature_annotations(self):
6464 self .assertIsNotNone (pin_annotation , "Pin annotation not found in annotations" )
6565 assert pin_annotation is not None
6666 json_data = pin_annotation .as_json ()
67- self .assertEqual (json_data ['direction' ], io . Direction . Output )
67+ self .assertEqual (json_data ['direction' ], 'o' )
6868 self .assertEqual (json_data ['width' ], 8 )
6969 self .assertEqual (json_data ['init' ]['value' ], 42 )
7070
@@ -170,11 +170,11 @@ def test_package_init(self):
170170 package_type = PACKAGE_DEFINITIONS ["cf20" ]
171171
172172 # Create package
173- package = Package (package_type = package_type )
173+ package = Package (type = package_type )
174174
175175 # Check properties
176- self .assertEqual (package .package_type , package_type )
177- self .assertEqual (package .package_type .name , "cf20" )
176+ self .assertEqual (package .type , package_type )
177+ self .assertEqual (package .type .name , "cf20" )
178178
179179
180180class TestPort (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments