Skip to content

Commit

Permalink
Un-string some types.
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Oct 24, 2023
1 parent d479466 commit f08a773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/common/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
TestGen: TypeAlias = Generator[Command | Value | Statement | None, Any, T]


def set_inputs(values: RecordValueDict, field: Record) -> "TestGen[None]":
def set_inputs(values: RecordValueDict, field: Record) -> TestGen[None]:
for name, value in values.items():
if isinstance(value, dict):
yield from set_inputs(value, getattr(field, name))
else:
yield getattr(field, name).eq(value)


def get_outputs(field: Record) -> "TestGen[RecordIntDict]":
def get_outputs(field: Record) -> TestGen[RecordIntDict]:
# return dict of all signal values in a record because amaranth's simulator can't read all
# values of a Record in a single yield - it can only read Values (Signals)
result = {}
Expand Down

0 comments on commit f08a773

Please sign in to comment.