Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Nov 25, 2024
1 parent 2cf4327 commit 143ac68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions transactron/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 143ac68

Please sign in to comment.