From c871d25eded3f144cf11344a86b39578d6c7e595 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 18 Oct 2022 15:20:55 -0700 Subject: [PATCH] stdlib: Fixing erroneous typing in Simulator __init__ The key in the `on_exit_event` dictionary can only be an ExitEvent. The typing information here suggested a string could be passed. This is not the case. This patch fixes the issue. Change-Id: Iaa4b66417c15e31f6aafe9e550a7552461a15be1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64773 Maintainer: Bobby Bruce Tested-by: kokoro Reviewed-by: Bobby Bruce --- src/python/gem5/simulate/simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/gem5/simulate/simulator.py b/src/python/gem5/simulate/simulator.py index b32e54aaad..1d0d3ecc66 100644 --- a/src/python/gem5/simulate/simulator.py +++ b/src/python/gem5/simulate/simulator.py @@ -87,7 +87,7 @@ class Simulator: board: AbstractBoard, full_system: Optional[bool] = None, on_exit_event: Optional[ - Dict[Union[str, ExitEvent], Generator[Optional[bool], None, None]] + Dict[ExitEvent, Generator[Optional[bool], None, None]] ] = None, expected_execution_order: Optional[List[ExitEvent]] = None, checkpoint_path: Optional[Path] = None,