Skip to content

Commit

Permalink
remove type comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Corvince committed Feb 5, 2021
1 parent 6af18a9 commit e4544a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mesa/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(self, width: int, height: int, torus: bool) -> None:
self.empties = set(itertools.product(*(range(self.width), range(self.height))))

# Neighborhood Cache
self._neighborhood_cache = dict() # type: Dict[Any, List[Coordinate]]
self._neighborhood_cache: Dict[Any, List[Coordinate]] = dict()

@staticmethod
def default_val() -> None:
Expand Down Expand Up @@ -197,7 +197,7 @@ def get_neighborhood(
neighborhood = self._neighborhood_cache.get(cache_key, None)

if neighborhood is None:
coordinates = set() # type: Set[Coordinate]
coordinates: Set[Coordinate] = set()

x, y = pos
for dy in range(-radius, radius + 1):
Expand Down Expand Up @@ -247,7 +247,6 @@ def iter_neighbors(
An iterator of non-None objects in the given neighborhood;
at most 9 if Moore, 5 if Von-Neumann
(8 and 4 if not including the center).
g
"""
neighborhood = self.get_neighborhood(pos, moore, include_center, radius)
return self.iter_cell_list_contents(neighborhood)
Expand Down

0 comments on commit e4544a9

Please sign in to comment.