1111
1212
1313class Campus (mg .GeoSpace ):
14- homes : Tuple [Building ]
15- works : Tuple [Building ]
16- other_buildings : Tuple [Building ]
14+ homes : tuple [Building ]
15+ works : tuple [Building ]
16+ other_buildings : tuple [Building ]
1717 home_counter : DefaultDict [mesa .space .FloatCoordinate , int ]
18- _buildings : Dict [int , Building ]
19- _commuters_pos_map : DefaultDict [mesa .space .FloatCoordinate , Set [Commuter ]]
20- _commuter_id_map : Dict [int , Commuter ]
18+ _buildings : dict [int , Building ]
19+ _commuters_pos_map : DefaultDict [mesa .space .FloatCoordinate , set [Commuter ]]
20+ _commuter_id_map : dict [int , Commuter ]
2121
2222 def __init__ (self , crs : str ) -> None :
2323 super ().__init__ (crs = crs )
@@ -56,7 +56,7 @@ def add_buildings(self, agents) -> None:
5656
5757 def get_commuters_by_pos (
5858 self , float_pos : mesa .space .FloatCoordinate
59- ) -> Set [Commuter ]:
59+ ) -> set [Commuter ]:
6060 return self ._commuters_pos_map [float_pos ]
6161
6262 def get_commuter_by_id (self , commuter_id : int ) -> Commuter :
@@ -69,7 +69,7 @@ def add_commuter(self, agent: Commuter) -> None:
6969
7070 def update_home_counter (
7171 self ,
72- old_home_pos : Optional [ mesa .space .FloatCoordinate ] ,
72+ old_home_pos : mesa .space .FloatCoordinate | None ,
7373 new_home_pos : mesa .space .FloatCoordinate ,
7474 ) -> None :
7575 if old_home_pos is not None :
0 commit comments