From de057a48bb472763d686b40234938d436026ffdc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:25:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mesa/experimental/cell_space/cell.py | 6 ++---- mesa/experimental/cell_space/discrete_space.py | 3 ++- mesa/experimental/cell_space/grid.py | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) 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):