diff --git a/mesa/experimental/cell_space/cell.py b/mesa/experimental/cell_space/cell.py index 1fcea747076..3e283270db4 100644 --- a/mesa/experimental/cell_space/cell.py +++ b/mesa/experimental/cell_space/cell.py @@ -2,7 +2,7 @@ from functools import cache from random import Random -from typing import TYPE_CHECKING, TypeVar, Generic +from typing import TYPE_CHECKING, Generic, TypeVar from mesa.experimental.cell_space.cell_collection import CellCollection @@ -59,9 +59,7 @@ def __init__( super().__init__() self.coordinate = coordinate self._connections: list[Cell[U]] = [] # TODO: change to CellCollection? - self.agents = ( - [] - ) # TODO:: change to AgentSet or weakrefs? (neither is very performant, ) + self.agents = [] # TODO:: change to AgentSet or weakrefs? (neither is very performant, ) self.capacity = capacity self.properties: dict[str, object] = {} self.random = random diff --git a/mesa/experimental/cell_space/discrete_space.py b/mesa/experimental/cell_space/discrete_space.py index fe3c0af78de..a05ffdb8828 100644 --- a/mesa/experimental/cell_space/discrete_space.py +++ b/mesa/experimental/cell_space/discrete_space.py @@ -45,7 +45,8 @@ def __init__( def cutoff_empties(self): return 7.953 * len(self._cells) ** 0.384 - def _connect_single_cell(self, cell: T): ... + def _connect_single_cell(self, cell: T): + ... @cached_property def all_cells(self): diff --git a/mesa/experimental/cell_space/grid.py b/mesa/experimental/cell_space/grid.py index 457a2ce274f..1f722df9f73 100644 --- a/mesa/experimental/cell_space/grid.py +++ b/mesa/experimental/cell_space/grid.py @@ -58,9 +58,11 @@ def _connect_cells(self) -> None: else: self._connect_cells_nd() - def _connect_cells_2d(self) -> None: ... + def _connect_cells_2d(self) -> None: + ... - def _connect_cells_nd(self) -> None: ... + def _connect_cells_nd(self) -> None: + ... def _validate_parameters(self): if not all(isinstance(dim, int) and dim > 0 for dim in self.dimensions):