From 4385ee9da32c095cf3d42739a7379bcc016952f7 Mon Sep 17 00:00:00 2001
From: crides <zhuhaoqing@live.cn>
Date: Thu, 23 Feb 2023 16:22:14 -0600
Subject: [PATCH] fix type

---
 verse/agents/example_agent/car_agent.py | 2 +-
 verse/analysis/analysis_tree.py         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/verse/agents/example_agent/car_agent.py b/verse/agents/example_agent/car_agent.py
index 353ccc6d..d70aa84f 100644
--- a/verse/agents/example_agent/car_agent.py
+++ b/verse/agents/example_agent/car_agent.py
@@ -44,7 +44,7 @@ class NPCAgent(BaseAgent):
         a = 0
         return steering, a  
 
-    def TC_simulate(self, mode: List[str], initialCondition, time_bound, time_step, lane_map:LaneMap=None)->TraceType:
+    def TC_simulate(self, mode: Tuple[str], initialCondition, time_bound, time_step, lane_map:LaneMap=None)->TraceType:
         time_bound = float(time_bound)
         number_points = int(np.ceil(time_bound/time_step))
 
diff --git a/verse/analysis/analysis_tree.py b/verse/analysis/analysis_tree.py
index 1e8601d0..dcfe954f 100644
--- a/verse/analysis/analysis_tree.py
+++ b/verse/analysis/analysis_tree.py
@@ -1,6 +1,6 @@
 from functools import reduce
 import pickle
-from typing import List, Dict, Any, Optional
+from typing import List, Dict, Any, Optional, Tuple
 import json
 from treelib import Tree
 import numpy.typing as nptyp, numpy as np, portion
@@ -35,7 +35,7 @@ class AnalysisTreeNode:
     ):
         self.trace: Dict[str, TraceType] = trace
         self.init: Dict[str, List[float]] = init
-        self.mode: Dict[str, List[str]] = mode
+        self.mode: Dict[str, Tuple[str]] = mode
         self.agent: Dict = agent
         self.height: int = height
         self.child: List[AnalysisTreeNode] = child
-- 
GitLab