Skip to content

Commit 26da376

Browse files
committed
refactor: Fix variable name typo from 'neighbour' to 'neighbor' in DefaultPoliceTargetAllocator
1 parent bb8bf61 commit 26da376

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

adf_core_python/implement/module/complex/default_police_target_allocator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ def resume(self, precompute_data: PrecomputeData) -> PoliceTargetAllocator:
5151
):
5252
building: Building = cast(Building, entity)
5353
for entity_id in building.get_neighbours():
54-
neighbour = self._world_info.get_entity(entity_id)
55-
if isinstance(neighbour, Road):
54+
neighbor = self._world_info.get_entity(entity_id)
55+
if isinstance(neighbor, Road):
5656
self._target_areas.add(entity_id)
5757

5858
for entity in self._world_info.get_entities_of_types([Refuge]):
5959
refuge: Refuge = cast(Refuge, entity)
6060
for entity_id in refuge.get_neighbours():
61-
neighbour = self._world_info.get_entity(entity_id)
62-
if isinstance(neighbour, Road):
61+
neighbor = self._world_info.get_entity(entity_id)
62+
if isinstance(neighbor, Road):
6363
self._priority_areas.add(entity_id)
6464
return self
6565

@@ -76,15 +76,15 @@ def prepare(self) -> PoliceTargetAllocator:
7676
):
7777
building: Building = cast(Building, entity)
7878
for entity_id in building.get_neighbours():
79-
neighbour = self._world_info.get_entity(entity_id)
80-
if isinstance(neighbour, Road):
79+
neighbor = self._world_info.get_entity(entity_id)
80+
if isinstance(neighbor, Road):
8181
self._target_areas.add(entity_id)
8282

8383
for entity in self._world_info.get_entities_of_types([Refuge]):
8484
refuge: Refuge = cast(Refuge, entity)
8585
for entity_id in refuge.get_neighbours():
86-
neighbour = self._world_info.get_entity(entity_id)
87-
if isinstance(neighbour, Road):
86+
neighbor = self._world_info.get_entity(entity_id)
87+
if isinstance(neighbor, Road):
8888
self._priority_areas.add(entity_id)
8989

9090
return self

0 commit comments

Comments
 (0)