diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a64e3bd..dbd8f25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip3 install -r .[dev] + pip3 install .[dev] - name: Check format run: ./scripts/lint.sh check_format diff --git a/transactron/core/manager.py b/transactron/core/manager.py index cfbc6b1..8d0226a 100644 --- a/transactron/core/manager.py +++ b/transactron/core/manager.py @@ -30,7 +30,7 @@ class MethodMap: def __init__(self, transactions: Iterable["Transaction"]): self.methods_by_transaction = dict[Transaction, list[Method]]() self.transactions_by_method = defaultdict[Method, list[Transaction]](list) - self.readiness_by_call = dict[tuple[Transaction, Method], ValueLike]() + self.argument_by_call = dict[tuple[Transaction, Method], MethodStruct]() self.ancestors_by_call = dict[tuple[Transaction, Method], tuple[Method, ...]]() self.method_parents = defaultdict[Method, list[TransactionBase]](list) @@ -42,7 +42,7 @@ def rec(transaction: Transaction, source: TransactionBase, ancestors: tuple[Meth raise RuntimeError(f"Method '{method.name}' can't be called twice from the same transaction") self.methods_by_transaction[transaction].append(method) self.transactions_by_method[method].append(transaction) - self.readiness_by_call[(transaction, method)] = method._validate_arguments(arg_rec) + self.argument_by_call[(transaction, method)] = arg_rec self.ancestors_by_call[(transaction, method)] = new_ancestors = (method, *ancestors) rec(transaction, method, new_ancestors) @@ -340,7 +340,7 @@ def elaborate(self, platform): for transaction in self.transactions: ready = [ - method_map.readiness_by_call[transaction, method] + method._validate_arguments(method_map.argument_by_call[transaction, method]) for method in method_map.methods_by_transaction[transaction] ] m.d.comb += transaction.runnable.eq(Cat(ready).all())