Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 6, 2024
1 parent 8d2fc29 commit de057a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions mesa/experimental/cell_space/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mesa/experimental/cell_space/discrete_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 4 additions & 2 deletions mesa/experimental/cell_space/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit de057a4

Please sign in to comment.