From 06b79aa2ef99f3f4b7089f2c0d9549484f6d1416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C4=99grzyn?= Date: Wed, 13 Nov 2024 16:21:53 +0100 Subject: [PATCH] Fix synthesis of some configurations (https://github.com/kuznia-rdzeni/coreblocks/pull/750) --- transactron/utils/dependencies.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transactron/utils/dependencies.py b/transactron/utils/dependencies.py index 010b03f..683ff58 100644 --- a/transactron/utils/dependencies.py +++ b/transactron/utils/dependencies.py @@ -138,6 +138,10 @@ def get_dependency(self, key: DependencyKey[Any, U]) -> U: return val + def dependency_provided(self, key: DependencyKey) -> bool: + """Checks if any dependency for a key is provided (ignores `empty_valid` parameter)""" + return key in self.dependencies + class DependencyContext: stack: list[DependencyManager] = []