From ed957e06b8b597292b6cd1693eeefd8babf780f9 Mon Sep 17 00:00:00 2001 From: devanshu Date: Thu, 28 Mar 2024 19:32:22 +0530 Subject: [PATCH 1/2] updated check_unreferenced_events --- autonomy/analyse/abci/app_spec.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/autonomy/analyse/abci/app_spec.py b/autonomy/analyse/abci/app_spec.py index 73e8a87d99..5e246672f5 100644 --- a/autonomy/analyse/abci/app_spec.py +++ b/autonomy/analyse/abci/app_spec.py @@ -475,13 +475,12 @@ def check_unreferenced_events(abci_app_cls: Any) -> List[str]: f"but missing from transition function" ) - # Filter timeout events using referenced events since we don't explicitly return the timeout events - timeout_events = round_transition_events - referenced_events - missing_timeout_events = timeout_events - abci_app_timeout_events - if len(missing_timeout_events) > 0: + # Filter unreferenced events using referenced events since we don't explicitly return the unreferenced events + unreferenced_events = (round_transition_events - referenced_events) - abci_app_timeout_events + if len(unreferenced_events) > 0: error_strings.append( - f"Events {missing_timeout_events} are defined in the round transitions of `{round_cls.__name__}` " - f"but not in `event_to_timeout`" + f"Events {unreferenced_events} are defined in the round transitions of `{round_cls.__name__}` " + f"but not in {round_cls.__name__}" ) return error_strings From 3d37d6d1aec60c60f77e7be7bd67f3717bd36a50 Mon Sep 17 00:00:00 2001 From: devanshu Date: Thu, 28 Mar 2024 19:52:10 +0530 Subject: [PATCH 2/2] ran linters --- autonomy/analyse/abci/app_spec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autonomy/analyse/abci/app_spec.py b/autonomy/analyse/abci/app_spec.py index 5e246672f5..e231b677ea 100644 --- a/autonomy/analyse/abci/app_spec.py +++ b/autonomy/analyse/abci/app_spec.py @@ -476,7 +476,9 @@ def check_unreferenced_events(abci_app_cls: Any) -> List[str]: ) # Filter unreferenced events using referenced events since we don't explicitly return the unreferenced events - unreferenced_events = (round_transition_events - referenced_events) - abci_app_timeout_events + unreferenced_events = ( + round_transition_events - referenced_events + ) - abci_app_timeout_events if len(unreferenced_events) > 0: error_strings.append( f"Events {unreferenced_events} are defined in the round transitions of `{round_cls.__name__}` "